diff --git a/Makefile b/Makefile index 3eaf34fb..9d5d1505 100644 --- a/Makefile +++ b/Makefile @@ -23,23 +23,23 @@ check-fmt: test -z `go fmt ./...` .gen-query: - docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO) $(GENTOOL_IMAGE) \ + docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO)/v2 $(GENTOOL_IMAGE) \ --go_out=:. $(REPO)/query/collection_operators.proto .gen-errdetails: - docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO) $(GENTOOL_IMAGE) \ + docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO)/v2 $(GENTOOL_IMAGE) \ --go_out=:. $(REPO)/rpc/errdetails/error_details.proto .gen-errfields: - docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO) $(GENTOOL_IMAGE) \ + docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO)/v2 $(GENTOOL_IMAGE) \ --go_out=:. $(REPO)/rpc/errfields/error_fields.proto .gen-servertestdata: - docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO) $(GENTOOL_IMAGE) \ - --go_out=plugins=grpc:. --grpc-gateway_out=logtostderr=true:. $(REPO)/server/testdata/test.proto + docker run --rm -v $(PROJECT_ROOT):/go/src/$(REPO)/v2 $(GENTOOL_IMAGE) \ + --go_out=. --go-grpc_out=. --grpc-gateway_out=logtostderr=true:. $(REPO)/v2/server/testdata/test.proto .PHONY: gen -gen: .gen-query .gen-errdetails .gen-errfields +gen: .gen-query .gen-errdetails .gen-errfields .gen-servertestdata .PHONY: mocks mocks: diff --git a/gateway/internal/test.proto b/gateway/internal/test.proto index 1db86310..221951b7 100644 --- a/gateway/internal/test.proto +++ b/gateway/internal/test.proto @@ -4,7 +4,7 @@ package infoblox.test; import "wrappers.proto"; -option go_package = "github.com/infobloxopen/atlas-app-toolkit/gateway;gateway_test"; +option go_package = "github.com/infobloxopen/atlas-app-toolkit/v2/gateway;gateway_test"; message User { string name = 1; diff --git a/query/collection_operators.pb.go b/query/collection_operators.pb.go index 5d1e96ca..6374ee54 100644 --- a/query/collection_operators.pb.go +++ b/query/collection_operators.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.15.7 +// protoc-gen-go v1.32.0 +// protoc v3.18.1 // source: github.com/infobloxopen/atlas-app-toolkit/query/collection_operators.proto package query @@ -1708,11 +1708,11 @@ var file_github_com_infobloxopen_atlas_app_toolkit_query_collection_operators_pr 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x3a, 0x1e, 0x92, 0x41, 0x1b, 0x0a, 0x19, 0x32, 0x13, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x62, 0x79, 0x9a, 0x02, - 0x01, 0x07, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x01, 0x07, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x2d, 0x61, 0x70, 0x70, 0x2d, 0x74, 0x6f, 0x6f, 0x6c, 0x6b, 0x69, 0x74, 0x2f, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x3b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x76, 0x32, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x3b, 0x71, 0x75, 0x65, 0x72, 0x79, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/query/collection_operators.proto b/query/collection_operators.proto index 26bf3ddd..efbc5cf9 100644 --- a/query/collection_operators.proto +++ b/query/collection_operators.proto @@ -4,7 +4,7 @@ package infoblox.api; import "protoc-gen-openapiv2/options/annotations.proto"; -option go_package = "github.com/infobloxopen/atlas-app-toolkit/query;query"; +option go_package = "github.com/infobloxopen/atlas-app-toolkit/v2/query;query"; // SortCriteria represents sort criteria message SortCriteria { diff --git a/rpc/errdetails/error_details.pb.go b/rpc/errdetails/error_details.pb.go index 784f3e56..59613979 100644 --- a/rpc/errdetails/error_details.pb.go +++ b/rpc/errdetails/error_details.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.15.7 +// protoc-gen-go v1.32.0 +// protoc v3.18.1 // source: github.com/infobloxopen/atlas-app-toolkit/rpc/errdetails/error_details.proto package errdetails diff --git a/rpc/errdetails/error_details.proto b/rpc/errdetails/error_details.proto index 10d0ed9f..43d2b083 100644 --- a/rpc/errdetails/error_details.proto +++ b/rpc/errdetails/error_details.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package atlas.rpc; -option go_package = "github.com/infobloxopen/atlas-app-toolkit/rpc/errdetails;errdetails"; +option go_package = "github.com/infobloxopen/atlas-app-toolkit/v2/rpc/errdetails;errdetails"; // TargetInfo is a default representation of error details that conforms // REST API Syntax Specification diff --git a/rpc/errfields/error_fields.pb.go b/rpc/errfields/error_fields.pb.go index 4366512d..2444c2d4 100644 --- a/rpc/errfields/error_fields.pb.go +++ b/rpc/errfields/error_fields.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.15.7 +// protoc-gen-go v1.32.0 +// protoc v3.18.1 // source: github.com/infobloxopen/atlas-app-toolkit/rpc/errfields/error_fields.proto package errfields diff --git a/rpc/resource/resource.proto b/rpc/resource/resource.proto index 5a5c17ac..41fd742d 100644 --- a/rpc/resource/resource.proto +++ b/rpc/resource/resource.proto @@ -4,7 +4,7 @@ package atlas.rpc; import "protoc-gen-openapiv2/options/annotations.proto"; -option go_package = "github.com/infobloxopen/atlas-app-toolkit/rpc/resource;resource"; +option go_package = "github.com/infobloxopen/atlas-app-toolkit/v2/rpc/resource;resource"; // A number of application services require a mechanism to // encode the identity of a particular resource across applications. diff --git a/server/testdata/test.pb.go b/server/testdata/test.pb.go index 166410e1..61c93f1f 100644 --- a/server/testdata/test.pb.go +++ b/server/testdata/test.pb.go @@ -1,17 +1,13 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 -// protoc v3.15.7 -// source: github.com/infobloxopen/atlas-app-toolkit/server/testdata/test.proto +// protoc-gen-go v1.32.0 +// protoc v3.18.1 +// source: github.com/infobloxopen/atlas-app-toolkit/v2/server/testdata/test.proto package server_test import ( - context "context" _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -36,7 +32,7 @@ type HelloRequest struct { func (x *HelloRequest) Reset() { *x = HelloRequest{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_msgTypes[0] + mi := &file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -49,7 +45,7 @@ func (x *HelloRequest) String() string { func (*HelloRequest) ProtoMessage() {} func (x *HelloRequest) ProtoReflect() protoreflect.Message { - mi := &file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_msgTypes[0] + mi := &file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -62,7 +58,7 @@ func (x *HelloRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead. func (*HelloRequest) Descriptor() ([]byte, []int) { - return file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_rawDescGZIP(), []int{0} + return file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_rawDescGZIP(), []int{0} } func (x *HelloRequest) GetName() string { @@ -83,7 +79,7 @@ type HelloResponse struct { func (x *HelloResponse) Reset() { *x = HelloResponse{} if protoimpl.UnsafeEnabled { - mi := &file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_msgTypes[1] + mi := &file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -96,7 +92,7 @@ func (x *HelloResponse) String() string { func (*HelloResponse) ProtoMessage() {} func (x *HelloResponse) ProtoReflect() protoreflect.Message { - mi := &file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_msgTypes[1] + mi := &file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -109,7 +105,7 @@ func (x *HelloResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use HelloResponse.ProtoReflect.Descriptor instead. func (*HelloResponse) Descriptor() ([]byte, []int) { - return file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_rawDescGZIP(), []int{1} + return file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_rawDescGZIP(), []int{1} } func (x *HelloResponse) GetGreeting() string { @@ -119,51 +115,52 @@ func (x *HelloResponse) GetGreeting() string { return "" } -var File_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto protoreflect.FileDescriptor +var File_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto protoreflect.FileDescriptor -var file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_rawDesc = []byte{ - 0x0a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x66, +var file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_rawDesc = []byte{ + 0x0a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x61, 0x74, 0x6c, 0x61, 0x73, 0x2d, - 0x61, 0x70, 0x70, 0x2d, 0x74, 0x6f, 0x6f, 0x6c, 0x6b, 0x69, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, 0x65, 0x73, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x1a, 0x1c, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x22, 0x0a, 0x0c, - 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x22, 0x2b, 0x0a, 0x0d, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, 0x32, 0x50, 0x0a, - 0x05, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x47, 0x0a, 0x08, 0x53, 0x61, 0x79, 0x48, 0x65, 0x6c, - 0x6c, 0x6f, 0x12, 0x14, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x6c, 0x6c, - 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x12, 0x06, 0x2f, 0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x42, - 0x47, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x6e, - 0x66, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x61, 0x74, 0x6c, 0x61, 0x73, - 0x2d, 0x61, 0x70, 0x70, 0x2d, 0x74, 0x6f, 0x6f, 0x6c, 0x6b, 0x69, 0x74, 0x2f, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x3b, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x70, 0x70, 0x2d, 0x74, 0x6f, 0x6f, 0x6c, 0x6b, 0x69, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x74, + 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0x22, 0x0a, 0x0c, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x22, 0x2b, 0x0a, 0x0d, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x72, 0x65, 0x65, 0x74, 0x69, 0x6e, 0x67, + 0x32, 0x50, 0x0a, 0x05, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x47, 0x0a, 0x08, 0x53, 0x61, 0x79, + 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x12, 0x14, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x48, + 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x2e, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x12, 0x06, 0x2f, 0x68, 0x65, 0x6c, + 0x6c, 0x6f, 0x42, 0x4a, 0x5a, 0x48, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x69, 0x6e, 0x66, 0x6f, 0x62, 0x6c, 0x6f, 0x78, 0x6f, 0x70, 0x65, 0x6e, 0x2f, 0x61, 0x74, + 0x6c, 0x61, 0x73, 0x2d, 0x61, 0x70, 0x70, 0x2d, 0x74, 0x6f, 0x6f, 0x6c, 0x6b, 0x69, 0x74, 0x2f, + 0x76, 0x32, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x64, 0x61, + 0x74, 0x61, 0x3b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x74, 0x65, 0x73, 0x74, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_rawDescOnce sync.Once - file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_rawDescData = file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_rawDesc + file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_rawDescOnce sync.Once + file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_rawDescData = file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_rawDesc ) -func file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_rawDescGZIP() []byte { - file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_rawDescOnce.Do(func() { - file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_rawDescData) +func file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_rawDescGZIP() []byte { + file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_rawDescOnce.Do(func() { + file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_rawDescData) }) - return file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_rawDescData + return file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_rawDescData } -var file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_goTypes = []interface{}{ +var file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_goTypes = []interface{}{ (*HelloRequest)(nil), // 0: server.HelloRequest (*HelloResponse)(nil), // 1: server.HelloResponse } -var file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_depIdxs = []int32{ +var file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_depIdxs = []int32{ 0, // 0: server.Hello.SayHello:input_type -> server.HelloRequest 1, // 1: server.Hello.SayHello:output_type -> server.HelloResponse 1, // [1:2] is the sub-list for method output_type @@ -173,13 +170,13 @@ var file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_de 0, // [0:0] is the sub-list for field type_name } -func init() { file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_init() } -func file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_init() { - if File_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto != nil { +func init() { file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_init() } +func file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_init() { + if File_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HelloRequest); i { case 0: return &v.state @@ -191,7 +188,7 @@ func file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_i return nil } } - file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HelloResponse); i { case 0: return &v.state @@ -208,98 +205,18 @@ func file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_i out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_rawDesc, + RawDescriptor: file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, - GoTypes: file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_goTypes, - DependencyIndexes: file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_depIdxs, - MessageInfos: file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_msgTypes, + GoTypes: file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_goTypes, + DependencyIndexes: file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_depIdxs, + MessageInfos: file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_msgTypes, }.Build() - File_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto = out.File - file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_rawDesc = nil - file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_goTypes = nil - file_github_com_infobloxopen_atlas_app_toolkit_server_testdata_test_proto_depIdxs = nil -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// HelloClient is the client API for Hello service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type HelloClient interface { - SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) -} - -type helloClient struct { - cc grpc.ClientConnInterface -} - -func NewHelloClient(cc grpc.ClientConnInterface) HelloClient { - return &helloClient{cc} -} - -func (c *helloClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) { - out := new(HelloResponse) - err := c.cc.Invoke(ctx, "/server.Hello/SayHello", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// HelloServer is the server API for Hello service. -type HelloServer interface { - SayHello(context.Context, *HelloRequest) (*HelloResponse, error) -} - -// UnimplementedHelloServer can be embedded to have forward compatible implementations. -type UnimplementedHelloServer struct { -} - -func (*UnimplementedHelloServer) SayHello(context.Context, *HelloRequest) (*HelloResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented") -} - -func RegisterHelloServer(s *grpc.Server, srv HelloServer) { - s.RegisterService(&_Hello_serviceDesc, srv) -} - -func _Hello_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(HelloRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(HelloServer).SayHello(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/server.Hello/SayHello", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(HelloServer).SayHello(ctx, req.(*HelloRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Hello_serviceDesc = grpc.ServiceDesc{ - ServiceName: "server.Hello", - HandlerType: (*HelloServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "SayHello", - Handler: _Hello_SayHello_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "github.com/infobloxopen/atlas-app-toolkit/v2/server/testdata/test.proto", + File_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto = out.File + file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_rawDesc = nil + file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_goTypes = nil + file_github_com_infobloxopen_atlas_app_toolkit_v2_server_testdata_test_proto_depIdxs = nil } diff --git a/server/testdata/test.pb.gw.go b/server/testdata/test.pb.gw.go index 2c72ecf5..97187b4d 100644 --- a/server/testdata/test.pb.gw.go +++ b/server/testdata/test.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: github.com/infobloxopen/atlas-app-toolkit/server/testdata/test.proto +// source: github.com/infobloxopen/atlas-app-toolkit/v2/server/testdata/test.proto /* Package server_test is a reverse proxy. diff --git a/server/testdata/test.proto b/server/testdata/test.proto index ccd8837a..c6b775b9 100644 --- a/server/testdata/test.proto +++ b/server/testdata/test.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package server; -option go_package = "github.com/infobloxopen/atlas-app-toolkit/server/testdata;server_test"; +option go_package = "github.com/infobloxopen/atlas-app-toolkit/v2/server/testdata;server_test"; import "google/api/annotations.proto"; diff --git a/server/testdata/test_grpc.pb.go b/server/testdata/test_grpc.pb.go new file mode 100644 index 00000000..0594a1d0 --- /dev/null +++ b/server/testdata/test_grpc.pb.go @@ -0,0 +1,105 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.2.0 +// - protoc v3.18.1 +// source: github.com/infobloxopen/atlas-app-toolkit/v2/server/testdata/test.proto + +package server_test + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// HelloClient is the client API for Hello service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type HelloClient interface { + SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) +} + +type helloClient struct { + cc grpc.ClientConnInterface +} + +func NewHelloClient(cc grpc.ClientConnInterface) HelloClient { + return &helloClient{cc} +} + +func (c *helloClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) { + out := new(HelloResponse) + err := c.cc.Invoke(ctx, "/server.Hello/SayHello", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// HelloServer is the server API for Hello service. +// All implementations must embed UnimplementedHelloServer +// for forward compatibility +type HelloServer interface { + SayHello(context.Context, *HelloRequest) (*HelloResponse, error) + mustEmbedUnimplementedHelloServer() +} + +// UnimplementedHelloServer must be embedded to have forward compatible implementations. +type UnimplementedHelloServer struct { +} + +func (UnimplementedHelloServer) SayHello(context.Context, *HelloRequest) (*HelloResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented") +} +func (UnimplementedHelloServer) mustEmbedUnimplementedHelloServer() {} + +// UnsafeHelloServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to HelloServer will +// result in compilation errors. +type UnsafeHelloServer interface { + mustEmbedUnimplementedHelloServer() +} + +func RegisterHelloServer(s grpc.ServiceRegistrar, srv HelloServer) { + s.RegisterService(&Hello_ServiceDesc, srv) +} + +func _Hello_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HelloRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HelloServer).SayHello(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/server.Hello/SayHello", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HelloServer).SayHello(ctx, req.(*HelloRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Hello_ServiceDesc is the grpc.ServiceDesc for Hello service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Hello_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "server.Hello", + HandlerType: (*HelloServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "SayHello", + Handler: _Hello_SayHello_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/infobloxopen/atlas-app-toolkit/v2/server/testdata/test.proto", +}