// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc v3.19.3 // source: hello.proto package murder 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 // HelloWorldClient is the client API for HelloWorld 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 HelloWorldClient interface { Login(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) GetScripts(ctx context.Context, in *QueryCondition, opts ...grpc.CallOption) (*HelloResponse, error) } type helloWorldClient struct { cc grpc.ClientConnInterface } func NewHelloWorldClient(cc grpc.ClientConnInterface) HelloWorldClient { return &helloWorldClient{cc} } func (c *helloWorldClient) Login(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloResponse, error) { out := new(HelloResponse) err := c.cc.Invoke(ctx, "/example_service.HelloWorld/Login", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *helloWorldClient) GetScripts(ctx context.Context, in *QueryCondition, opts ...grpc.CallOption) (*HelloResponse, error) { out := new(HelloResponse) err := c.cc.Invoke(ctx, "/example_service.HelloWorld/GetScripts", in, out, opts...) if err != nil { return nil, err } return out, nil } // HelloWorldServer is the server API for HelloWorld service. // All implementations must embed UnimplementedHelloWorldServer // for forward compatibility type HelloWorldServer interface { Login(context.Context, *HelloRequest) (*HelloResponse, error) GetScripts(context.Context, *QueryCondition) (*HelloResponse, error) mustEmbedUnimplementedHelloWorldServer() } // UnimplementedHelloWorldServer must be embedded to have forward compatible implementations. type UnimplementedHelloWorldServer struct { } func (UnimplementedHelloWorldServer) Login(context.Context, *HelloRequest) (*HelloResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Login not implemented") } func (UnimplementedHelloWorldServer) GetScripts(context.Context, *QueryCondition) (*HelloResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetScripts not implemented") } func (UnimplementedHelloWorldServer) mustEmbedUnimplementedHelloWorldServer() {} // UnsafeHelloWorldServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to HelloWorldServer will // result in compilation errors. type UnsafeHelloWorldServer interface { mustEmbedUnimplementedHelloWorldServer() } func RegisterHelloWorldServer(s grpc.ServiceRegistrar, srv HelloWorldServer) { s.RegisterService(&HelloWorld_ServiceDesc, srv) } func _HelloWorld_Login_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.(HelloWorldServer).Login(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/example_service.HelloWorld/Login", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HelloWorldServer).Login(ctx, req.(*HelloRequest)) } return interceptor(ctx, in, info, handler) } func _HelloWorld_GetScripts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryCondition) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(HelloWorldServer).GetScripts(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/example_service.HelloWorld/GetScripts", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(HelloWorldServer).GetScripts(ctx, req.(*QueryCondition)) } return interceptor(ctx, in, info, handler) } // HelloWorld_ServiceDesc is the grpc.ServiceDesc for HelloWorld service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var HelloWorld_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example_service.HelloWorld", HandlerType: (*HelloWorldServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _HelloWorld_Login_Handler, }, { MethodName: "GetScripts", Handler: _HelloWorld_GetScripts_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "hello.proto", }