// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package helloworld import ( context "context" empty "github.com/golang/protobuf/ptypes/empty" wrappers "github.com/golang/protobuf/ptypes/wrappers" 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 // GreeterClient is the client API for Greeter 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 GreeterClient interface { // Sends a greeting SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) Compute(ctx context.Context, in *InferRequest, opts ...grpc.CallOption) (*Response, error) // Primitive type param. Not supported for rest json GetFeature(ctx context.Context, in *wrappers.BytesValue, opts ...grpc.CallOption) (*FeatureResponse, error) ObjectDetection(ctx context.Context, in *ObjectDetectionRequest, opts ...grpc.CallOption) (*ObjectDetectionResponse, error) GetStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*wrappers.BoolValue, error) } type greeterClient struct { cc grpc.ClientConnInterface } func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient { return &greeterClient{cc} } func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) { out := new(HelloReply) err := c.cc.Invoke(ctx, "/helloworld.Greeter/SayHello", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *greeterClient) Compute(ctx context.Context, in *InferRequest, opts ...grpc.CallOption) (*Response, error) { out := new(Response) err := c.cc.Invoke(ctx, "/helloworld.Greeter/Compute", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *greeterClient) GetFeature(ctx context.Context, in *wrappers.BytesValue, opts ...grpc.CallOption) (*FeatureResponse, error) { out := new(FeatureResponse) err := c.cc.Invoke(ctx, "/helloworld.Greeter/get_feature", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *greeterClient) ObjectDetection(ctx context.Context, in *ObjectDetectionRequest, opts ...grpc.CallOption) (*ObjectDetectionResponse, error) { out := new(ObjectDetectionResponse) err := c.cc.Invoke(ctx, "/helloworld.Greeter/object_detection", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *greeterClient) GetStatus(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*wrappers.BoolValue, error) { out := new(wrappers.BoolValue) err := c.cc.Invoke(ctx, "/helloworld.Greeter/getStatus", in, out, opts...) if err != nil { return nil, err } return out, nil } // GreeterServer is the server API for Greeter service. // All implementations must embed UnimplementedGreeterServer // for forward compatibility type GreeterServer interface { // Sends a greeting SayHello(context.Context, *HelloRequest) (*HelloReply, error) Compute(context.Context, *InferRequest) (*Response, error) // Primitive type param. Not supported for rest json GetFeature(context.Context, *wrappers.BytesValue) (*FeatureResponse, error) ObjectDetection(context.Context, *ObjectDetectionRequest) (*ObjectDetectionResponse, error) GetStatus(context.Context, *empty.Empty) (*wrappers.BoolValue, error) mustEmbedUnimplementedGreeterServer() } // UnimplementedGreeterServer must be embedded to have forward compatible implementations. type UnimplementedGreeterServer struct { } func (UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error) { return nil, status.Errorf(codes.Unimplemented, "method SayHello not implemented") } func (UnimplementedGreeterServer) Compute(context.Context, *InferRequest) (*Response, error) { return nil, status.Errorf(codes.Unimplemented, "method Compute not implemented") } func (UnimplementedGreeterServer) GetFeature(context.Context, *wrappers.BytesValue) (*FeatureResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetFeature not implemented") } func (UnimplementedGreeterServer) ObjectDetection(context.Context, *ObjectDetectionRequest) (*ObjectDetectionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ObjectDetection not implemented") } func (UnimplementedGreeterServer) GetStatus(context.Context, *empty.Empty) (*wrappers.BoolValue, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStatus not implemented") } func (UnimplementedGreeterServer) mustEmbedUnimplementedGreeterServer() {} // UnsafeGreeterServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to GreeterServer will // result in compilation errors. type UnsafeGreeterServer interface { mustEmbedUnimplementedGreeterServer() } func RegisterGreeterServer(s grpc.ServiceRegistrar, srv GreeterServer) { s.RegisterService(&Greeter_ServiceDesc, srv) } func _Greeter_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.(GreeterServer).SayHello(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/helloworld.Greeter/SayHello", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GreeterServer).SayHello(ctx, req.(*HelloRequest)) } return interceptor(ctx, in, info, handler) } func _Greeter_Compute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(InferRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(GreeterServer).Compute(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/helloworld.Greeter/Compute", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GreeterServer).Compute(ctx, req.(*InferRequest)) } return interceptor(ctx, in, info, handler) } func _Greeter_GetFeature_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(wrappers.BytesValue) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(GreeterServer).GetFeature(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/helloworld.Greeter/get_feature", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GreeterServer).GetFeature(ctx, req.(*wrappers.BytesValue)) } return interceptor(ctx, in, info, handler) } func _Greeter_ObjectDetection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ObjectDetectionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(GreeterServer).ObjectDetection(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/helloworld.Greeter/object_detection", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GreeterServer).ObjectDetection(ctx, req.(*ObjectDetectionRequest)) } return interceptor(ctx, in, info, handler) } func _Greeter_GetStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(empty.Empty) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(GreeterServer).GetStatus(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/helloworld.Greeter/getStatus", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(GreeterServer).GetStatus(ctx, req.(*empty.Empty)) } return interceptor(ctx, in, info, handler) } // Greeter_ServiceDesc is the grpc.ServiceDesc for Greeter service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Greeter_ServiceDesc = grpc.ServiceDesc{ ServiceName: "helloworld.Greeter", HandlerType: (*GreeterServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SayHello", Handler: _Greeter_SayHello_Handler, }, { MethodName: "Compute", Handler: _Greeter_Compute_Handler, }, { MethodName: "get_feature", Handler: _Greeter_GetFeature_Handler, }, { MethodName: "object_detection", Handler: _Greeter_ObjectDetection_Handler, }, { MethodName: "getStatus", Handler: _Greeter_GetStatus_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "hw.proto", }