// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc (unknown) // source: customer/service.proto package customer import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // 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 const ( CustomerService_InsertHistory_FullMethodName = "/customer.CustomerService/InsertHistory" ) // CustomerServiceClient is the client API for CustomerService 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 CustomerServiceClient interface { InsertHistory(ctx context.Context, in *History, opts ...grpc.CallOption) (*emptypb.Empty, error) } type customerServiceClient struct { cc grpc.ClientConnInterface } func NewCustomerServiceClient(cc grpc.ClientConnInterface) CustomerServiceClient { return &customerServiceClient{cc} } func (c *customerServiceClient) InsertHistory(ctx context.Context, in *History, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, CustomerService_InsertHistory_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // CustomerServiceServer is the server API for CustomerService service. // All implementations should embed UnimplementedCustomerServiceServer // for forward compatibility type CustomerServiceServer interface { InsertHistory(context.Context, *History) (*emptypb.Empty, error) } // UnimplementedCustomerServiceServer should be embedded to have forward compatible implementations. type UnimplementedCustomerServiceServer struct { } func (UnimplementedCustomerServiceServer) InsertHistory(context.Context, *History) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method InsertHistory not implemented") } // UnsafeCustomerServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CustomerServiceServer will // result in compilation errors. type UnsafeCustomerServiceServer interface { mustEmbedUnimplementedCustomerServiceServer() } func RegisterCustomerServiceServer(s grpc.ServiceRegistrar, srv CustomerServiceServer) { s.RegisterService(&CustomerService_ServiceDesc, srv) } func _CustomerService_InsertHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(History) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CustomerServiceServer).InsertHistory(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: CustomerService_InsertHistory_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CustomerServiceServer).InsertHistory(ctx, req.(*History)) } return interceptor(ctx, in, info, handler) } // CustomerService_ServiceDesc is the grpc.ServiceDesc for CustomerService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var CustomerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "customer.CustomerService", HandlerType: (*CustomerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "InsertHistory", Handler: _CustomerService_InsertHistory_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "customer/service.proto", }