From f9d180294a17543ae70a8b04272506885dcb11ca Mon Sep 17 00:00:00 2001 From: Mahan Zendedel DH Date: Mon, 15 Apr 2024 13:43:33 +0400 Subject: [PATCH] fix: proto --- proto/es-sink.proto | 2 +- proto/src/golang/es-sink.pb.go | 42 ++++++++-------- proto/src/golang/es-sink_grpc.pb.go | 76 ++++++++++++++--------------- 3 files changed, 60 insertions(+), 60 deletions(-) diff --git a/proto/es-sink.proto b/proto/es-sink.proto index 8fbb971..eb60eb5 100644 --- a/proto/es-sink.proto +++ b/proto/es-sink.proto @@ -42,7 +42,7 @@ message AzureResource { map tags = 11; } -service DescribeService { +service EsSinkService { rpc DeliverAWSResources(AWSResources) returns (kaytu.entity.v1.ResponseOK) {} rpc DeliverAzureResources(AzureResources) returns (kaytu.entity.v1.ResponseOK) {} } \ No newline at end of file diff --git a/proto/src/golang/es-sink.pb.go b/proto/src/golang/es-sink.pb.go index e362cd0..96f7b8a 100644 --- a/proto/src/golang/es-sink.pb.go +++ b/proto/src/golang/es-sink.pb.go @@ -460,23 +460,23 @@ var file_es_sink_proto_rawDesc = []byte{ 0x1a, 0x37, 0x0a, 0x09, 0x54, 0x61, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xc1, 0x01, 0x0a, 0x0f, 0x44, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x54, 0x0a, - 0x13, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x41, 0x57, 0x53, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x6b, 0x61, 0x79, 0x74, 0x75, 0x2e, 0x65, 0x73, 0x5f, - 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x57, 0x53, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x73, 0x1a, 0x1b, 0x2e, 0x6b, 0x61, 0x79, 0x74, 0x75, 0x2e, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, - 0x4b, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x41, 0x7a, - 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6b, - 0x61, 0x79, 0x74, 0x75, 0x2e, 0x65, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x7a, 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x1b, - 0x2e, 0x6b, 0x61, 0x79, 0x74, 0x75, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x4b, 0x22, 0x00, 0x42, 0x31, 0x5a, - 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x61, 0x79, 0x74, - 0x75, 0x2d, 0x69, 0x6f, 0x2f, 0x6b, 0x61, 0x79, 0x74, 0x75, 0x2d, 0x75, 0x74, 0x69, 0x6c, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xbf, 0x01, 0x0a, 0x0d, 0x45, 0x73, + 0x53, 0x69, 0x6e, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x54, 0x0a, 0x13, 0x44, + 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x41, 0x57, 0x53, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x6b, 0x61, 0x79, 0x74, 0x75, 0x2e, 0x65, 0x73, 0x5f, 0x73, 0x69, + 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x57, 0x53, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x73, 0x1a, 0x1b, 0x2e, 0x6b, 0x61, 0x79, 0x74, 0x75, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x4b, 0x22, + 0x00, 0x12, 0x58, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x69, 0x76, 0x65, 0x72, 0x41, 0x7a, 0x75, 0x72, + 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6b, 0x61, 0x79, + 0x74, 0x75, 0x2e, 0x65, 0x73, 0x5f, 0x73, 0x69, 0x6e, 0x6b, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x7a, + 0x75, 0x72, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x1a, 0x1b, 0x2e, 0x6b, + 0x61, 0x79, 0x74, 0x75, 0x2e, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4f, 0x4b, 0x22, 0x00, 0x42, 0x31, 0x5a, 0x2f, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x61, 0x79, 0x74, 0x75, 0x2d, + 0x69, 0x6f, 0x2f, 0x6b, 0x61, 0x79, 0x74, 0x75, 0x2d, 0x75, 0x74, 0x69, 0x6c, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x72, 0x63, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -513,10 +513,10 @@ var file_es_sink_proto_depIdxs = []int32{ 8, // 5: kaytu.es_sink.v1.AzureResource.job:type_name -> kaytu.entity.v1.DescribeJob 6, // 6: kaytu.es_sink.v1.AzureResource.metadata:type_name -> kaytu.es_sink.v1.AzureResource.MetadataEntry 7, // 7: kaytu.es_sink.v1.AzureResource.tags:type_name -> kaytu.es_sink.v1.AzureResource.TagsEntry - 0, // 8: kaytu.es_sink.v1.DescribeService.DeliverAWSResources:input_type -> kaytu.es_sink.v1.AWSResources - 2, // 9: kaytu.es_sink.v1.DescribeService.DeliverAzureResources:input_type -> kaytu.es_sink.v1.AzureResources - 9, // 10: kaytu.es_sink.v1.DescribeService.DeliverAWSResources:output_type -> kaytu.entity.v1.ResponseOK - 9, // 11: kaytu.es_sink.v1.DescribeService.DeliverAzureResources:output_type -> kaytu.entity.v1.ResponseOK + 0, // 8: kaytu.es_sink.v1.EsSinkService.DeliverAWSResources:input_type -> kaytu.es_sink.v1.AWSResources + 2, // 9: kaytu.es_sink.v1.EsSinkService.DeliverAzureResources:input_type -> kaytu.es_sink.v1.AzureResources + 9, // 10: kaytu.es_sink.v1.EsSinkService.DeliverAWSResources:output_type -> kaytu.entity.v1.ResponseOK + 9, // 11: kaytu.es_sink.v1.EsSinkService.DeliverAzureResources:output_type -> kaytu.entity.v1.ResponseOK 10, // [10:12] is the sub-list for method output_type 8, // [8:10] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name diff --git a/proto/src/golang/es-sink_grpc.pb.go b/proto/src/golang/es-sink_grpc.pb.go index 21699b4..bc3c6fa 100644 --- a/proto/src/golang/es-sink_grpc.pb.go +++ b/proto/src/golang/es-sink_grpc.pb.go @@ -18,122 +18,122 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 -// DescribeServiceClient is the client API for DescribeService service. +// EsSinkServiceClient is the client API for EsSinkService 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 DescribeServiceClient interface { +type EsSinkServiceClient interface { DeliverAWSResources(ctx context.Context, in *AWSResources, opts ...grpc.CallOption) (*ResponseOK, error) DeliverAzureResources(ctx context.Context, in *AzureResources, opts ...grpc.CallOption) (*ResponseOK, error) } -type describeServiceClient struct { +type esSinkServiceClient struct { cc grpc.ClientConnInterface } -func NewDescribeServiceClient(cc grpc.ClientConnInterface) DescribeServiceClient { - return &describeServiceClient{cc} +func NewEsSinkServiceClient(cc grpc.ClientConnInterface) EsSinkServiceClient { + return &esSinkServiceClient{cc} } -func (c *describeServiceClient) DeliverAWSResources(ctx context.Context, in *AWSResources, opts ...grpc.CallOption) (*ResponseOK, error) { +func (c *esSinkServiceClient) DeliverAWSResources(ctx context.Context, in *AWSResources, opts ...grpc.CallOption) (*ResponseOK, error) { out := new(ResponseOK) - err := c.cc.Invoke(ctx, "/kaytu.es_sink.v1.DescribeService/DeliverAWSResources", in, out, opts...) + err := c.cc.Invoke(ctx, "/kaytu.es_sink.v1.EsSinkService/DeliverAWSResources", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *describeServiceClient) DeliverAzureResources(ctx context.Context, in *AzureResources, opts ...grpc.CallOption) (*ResponseOK, error) { +func (c *esSinkServiceClient) DeliverAzureResources(ctx context.Context, in *AzureResources, opts ...grpc.CallOption) (*ResponseOK, error) { out := new(ResponseOK) - err := c.cc.Invoke(ctx, "/kaytu.es_sink.v1.DescribeService/DeliverAzureResources", in, out, opts...) + err := c.cc.Invoke(ctx, "/kaytu.es_sink.v1.EsSinkService/DeliverAzureResources", in, out, opts...) if err != nil { return nil, err } return out, nil } -// DescribeServiceServer is the server API for DescribeService service. -// All implementations must embed UnimplementedDescribeServiceServer +// EsSinkServiceServer is the server API for EsSinkService service. +// All implementations must embed UnimplementedEsSinkServiceServer // for forward compatibility -type DescribeServiceServer interface { +type EsSinkServiceServer interface { DeliverAWSResources(context.Context, *AWSResources) (*ResponseOK, error) DeliverAzureResources(context.Context, *AzureResources) (*ResponseOK, error) - mustEmbedUnimplementedDescribeServiceServer() + mustEmbedUnimplementedEsSinkServiceServer() } -// UnimplementedDescribeServiceServer must be embedded to have forward compatible implementations. -type UnimplementedDescribeServiceServer struct { +// UnimplementedEsSinkServiceServer must be embedded to have forward compatible implementations. +type UnimplementedEsSinkServiceServer struct { } -func (UnimplementedDescribeServiceServer) DeliverAWSResources(context.Context, *AWSResources) (*ResponseOK, error) { +func (UnimplementedEsSinkServiceServer) DeliverAWSResources(context.Context, *AWSResources) (*ResponseOK, error) { return nil, status.Errorf(codes.Unimplemented, "method DeliverAWSResources not implemented") } -func (UnimplementedDescribeServiceServer) DeliverAzureResources(context.Context, *AzureResources) (*ResponseOK, error) { +func (UnimplementedEsSinkServiceServer) DeliverAzureResources(context.Context, *AzureResources) (*ResponseOK, error) { return nil, status.Errorf(codes.Unimplemented, "method DeliverAzureResources not implemented") } -func (UnimplementedDescribeServiceServer) mustEmbedUnimplementedDescribeServiceServer() {} +func (UnimplementedEsSinkServiceServer) mustEmbedUnimplementedEsSinkServiceServer() {} -// UnsafeDescribeServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to DescribeServiceServer will +// UnsafeEsSinkServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to EsSinkServiceServer will // result in compilation errors. -type UnsafeDescribeServiceServer interface { - mustEmbedUnimplementedDescribeServiceServer() +type UnsafeEsSinkServiceServer interface { + mustEmbedUnimplementedEsSinkServiceServer() } -func RegisterDescribeServiceServer(s grpc.ServiceRegistrar, srv DescribeServiceServer) { - s.RegisterService(&DescribeService_ServiceDesc, srv) +func RegisterEsSinkServiceServer(s grpc.ServiceRegistrar, srv EsSinkServiceServer) { + s.RegisterService(&EsSinkService_ServiceDesc, srv) } -func _DescribeService_DeliverAWSResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _EsSinkService_DeliverAWSResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AWSResources) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DescribeServiceServer).DeliverAWSResources(ctx, in) + return srv.(EsSinkServiceServer).DeliverAWSResources(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/kaytu.es_sink.v1.DescribeService/DeliverAWSResources", + FullMethod: "/kaytu.es_sink.v1.EsSinkService/DeliverAWSResources", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DescribeServiceServer).DeliverAWSResources(ctx, req.(*AWSResources)) + return srv.(EsSinkServiceServer).DeliverAWSResources(ctx, req.(*AWSResources)) } return interceptor(ctx, in, info, handler) } -func _DescribeService_DeliverAzureResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _EsSinkService_DeliverAzureResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AzureResources) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(DescribeServiceServer).DeliverAzureResources(ctx, in) + return srv.(EsSinkServiceServer).DeliverAzureResources(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/kaytu.es_sink.v1.DescribeService/DeliverAzureResources", + FullMethod: "/kaytu.es_sink.v1.EsSinkService/DeliverAzureResources", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DescribeServiceServer).DeliverAzureResources(ctx, req.(*AzureResources)) + return srv.(EsSinkServiceServer).DeliverAzureResources(ctx, req.(*AzureResources)) } return interceptor(ctx, in, info, handler) } -// DescribeService_ServiceDesc is the grpc.ServiceDesc for DescribeService service. +// EsSinkService_ServiceDesc is the grpc.ServiceDesc for EsSinkService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var DescribeService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "kaytu.es_sink.v1.DescribeService", - HandlerType: (*DescribeServiceServer)(nil), +var EsSinkService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kaytu.es_sink.v1.EsSinkService", + HandlerType: (*EsSinkServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "DeliverAWSResources", - Handler: _DescribeService_DeliverAWSResources_Handler, + Handler: _EsSinkService_DeliverAWSResources_Handler, }, { MethodName: "DeliverAzureResources", - Handler: _DescribeService_DeliverAzureResources_Handler, + Handler: _EsSinkService_DeliverAzureResources_Handler, }, }, Streams: []grpc.StreamDesc{},