From 75c244f1a60f6b48da9dbade5981937aa34a1237 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Thu, 30 Dec 2021 14:20:18 +0300 Subject: [PATCH] update Signed-off-by: Vasiliy Tolstov --- api/annotations.pb.go | 2 +- api/client.pb.go | 155 ++++++++++++++++++++++++++++++++++++ api/client.proto | 60 ++++++++++++++ api/field_behavior.pb.go | 2 +- api/http.pb.go | 2 +- api/httpbody.pb.go | 2 +- api/micro.pb.go | 2 +- generate.go | 1 + openapiv2/annotations.pb.go | 2 +- openapiv2/gopenapiv2.pb.go | 2 +- openapiv3/gopenapiv3.pb.go | 2 +- tag/tag.pb.go | 2 +- 12 files changed, 225 insertions(+), 9 deletions(-) create mode 100644 api/client.pb.go create mode 100644 api/client.proto diff --git a/api/annotations.pb.go b/api/annotations.pb.go index 25ab21e..9b1c62c 100644 --- a/api/annotations.pb.go +++ b/api/annotations.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.6 +// protoc v3.19.1 // source: api/annotations.proto package api diff --git a/api/client.pb.go b/api/client.pb.go new file mode 100644 index 0000000..3ec75e5 --- /dev/null +++ b/api/client.pb.go @@ -0,0 +1,155 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.19.1 +// source: api/client.proto + +package api + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + reflect "reflect" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +var file_api_client_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*string)(nil), + Field: 1049, + Name: "micro.api.default_host", + Tag: "bytes,1049,opt,name=default_host", + Filename: "api/client.proto", + }, + { + ExtendedType: (*descriptorpb.ServiceOptions)(nil), + ExtensionType: (*string)(nil), + Field: 1050, + Name: "micro.api.oauth_scopes", + Tag: "bytes,1050,opt,name=oauth_scopes", + Filename: "api/client.proto", + }, +} + +// Extension fields to descriptorpb.ServiceOptions. +var ( + // The hostname for this service. + // This should be specified with no prefix or protocol. + // + // Example: + // + // service Foo { + // option (google.api.default_host) = "foo.googleapi.com"; + // ... + // } + // + // optional string default_host = 1049; + E_DefaultHost = &file_api_client_proto_extTypes[0] + // OAuth scopes needed for the client. + // + // Example: + // + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform"; + // ... + // } + // + // If there is more than one scope, use a comma-separated string: + // + // Example: + // + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform," + // "https://www.googleapis.com/auth/monitoring"; + // ... + // } + // + // optional string oauth_scopes = 1050; + E_OauthScopes = &file_api_client_proto_extTypes[1] +) + +var File_api_client_proto protoreflect.FileDescriptor + +var file_api_client_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x09, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x20, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, + 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3a, + 0x43, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x68, 0x6f, 0x73, 0x74, 0x12, + 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x99, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, + 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x43, 0x0a, 0x0c, 0x6f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x73, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x9a, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x61, + 0x75, 0x74, 0x68, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x42, 0x4e, 0x0a, 0x09, 0x6d, 0x69, 0x63, + 0x72, 0x6f, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0b, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x75, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x6f, 0x72, 0x67, 0x2f, 0x6d, + 0x69, 0x63, 0x72, 0x6f, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x3b, 0x61, + 0x70, 0x69, 0xa2, 0x02, 0x04, 0x4d, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var file_api_client_proto_goTypes = []interface{}{ + (*descriptorpb.ServiceOptions)(nil), // 0: google.protobuf.ServiceOptions +} +var file_api_client_proto_depIdxs = []int32{ + 0, // 0: micro.api.default_host:extendee -> google.protobuf.ServiceOptions + 0, // 1: micro.api.oauth_scopes:extendee -> google.protobuf.ServiceOptions + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 0, // [0:2] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_api_client_proto_init() } +func file_api_client_proto_init() { + if File_api_client_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_client_proto_rawDesc, + NumEnums: 0, + NumMessages: 0, + NumExtensions: 2, + NumServices: 0, + }, + GoTypes: file_api_client_proto_goTypes, + DependencyIndexes: file_api_client_proto_depIdxs, + ExtensionInfos: file_api_client_proto_extTypes, + }.Build() + File_api_client_proto = out.File + file_api_client_proto_rawDesc = nil + file_api_client_proto_goTypes = nil + file_api_client_proto_depIdxs = nil +} diff --git a/api/client.proto b/api/client.proto new file mode 100644 index 0000000..17e0a5e --- /dev/null +++ b/api/client.proto @@ -0,0 +1,60 @@ +// Copyright 2018 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package micro.api; + +import "google/protobuf/descriptor.proto"; + +option go_package = "github.com/unistack-org/micro-proto/api;api"; +option java_multiple_files = true; +option java_outer_classname = "ClientProto"; +option java_package = "micro.api"; +option objc_class_prefix = "MAPI"; + +extend google.protobuf.ServiceOptions { + // The hostname for this service. + // This should be specified with no prefix or protocol. + // + // Example: + // + // service Foo { + // option (google.api.default_host) = "foo.googleapi.com"; + // ... + // } + string default_host = 1049; + + // OAuth scopes needed for the client. + // + // Example: + // + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform"; + // ... + // } + // + // If there is more than one scope, use a comma-separated string: + // + // Example: + // + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform," + // "https://www.googleapis.com/auth/monitoring"; + // ... + // } + string oauth_scopes = 1050; +} diff --git a/api/field_behavior.pb.go b/api/field_behavior.pb.go index 9ed1544..64ae13e 100644 --- a/api/field_behavior.pb.go +++ b/api/field_behavior.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.6 +// protoc v3.19.1 // source: api/field_behavior.proto package api diff --git a/api/http.pb.go b/api/http.pb.go index f8a573f..05bd23e 100644 --- a/api/http.pb.go +++ b/api/http.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.6 +// protoc v3.19.1 // source: api/http.proto package api diff --git a/api/httpbody.pb.go b/api/httpbody.pb.go index 0b2b306..78b6501 100644 --- a/api/httpbody.pb.go +++ b/api/httpbody.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.6 +// protoc v3.19.1 // source: api/httpbody.proto package api diff --git a/api/micro.pb.go b/api/micro.pb.go index ff5cf19..ff5217e 100644 --- a/api/micro.pb.go +++ b/api/micro.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.6 +// protoc v3.19.1 // source: api/micro.proto package api diff --git a/generate.go b/generate.go index 67197dc..b144e0a 100644 --- a/generate.go +++ b/generate.go @@ -5,6 +5,7 @@ package main //go:generate protoc -I. -I./api --go_out=paths=source_relative:. ./api/micro.proto //go:generate protoc -I. -I./api --go_out=paths=source_relative:. ./api/field_behavior.proto //go:generate protoc -I. -I./api --go_out=paths=source_relative:. ./api/httpbody.proto +//go:generate protoc -I. -I./api --go_out=paths=source_relative:. ./api/client.proto //go:generate protoc -I. -I./openapiv2 --go_out=paths=source_relative:. ./openapiv2/annotations.proto ///go:generate protoc -I. -I./openapiv2 --go_out=paths=source_relative:. ./openapiv2/openapiv2.proto //go:generate protoc -I. -I./openapiv2 --go_out=paths=source_relative:. ./openapiv2/gopenapiv2.proto diff --git a/openapiv2/annotations.pb.go b/openapiv2/annotations.pb.go index d056461..030dff8 100644 --- a/openapiv2/annotations.pb.go +++ b/openapiv2/annotations.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.6 +// protoc v3.19.1 // source: openapiv2/annotations.proto package openapiv2 diff --git a/openapiv2/gopenapiv2.pb.go b/openapiv2/gopenapiv2.pb.go index f473cba..46f62b6 100644 --- a/openapiv2/gopenapiv2.pb.go +++ b/openapiv2/gopenapiv2.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.6 +// protoc v3.19.1 // source: openapiv2/gopenapiv2.proto package openapiv2 diff --git a/openapiv3/gopenapiv3.pb.go b/openapiv3/gopenapiv3.pb.go index c37a34a..4b18c0c 100644 --- a/openapiv3/gopenapiv3.pb.go +++ b/openapiv3/gopenapiv3.pb.go @@ -17,7 +17,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.6 +// protoc v3.19.1 // source: openapiv3/gopenapiv3.proto package openapiv3 diff --git a/tag/tag.pb.go b/tag/tag.pb.go index 39a8458..8347834 100644 --- a/tag/tag.pb.go +++ b/tag/tag.pb.go @@ -15,7 +15,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.15.6 +// protoc v3.19.1 // source: tag/tag.proto package tag