// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 // - protoc v3.21.12 // source: calc_service.proto package __ 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 // CalcServiceClient is the client API for CalcService 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 CalcServiceClient interface { Add(ctx context.Context, in *AdditionRequest, opts ...grpc.CallOption) (*AdditionResponse, error) } type calcServiceClient struct { cc grpc.ClientConnInterface } func NewCalcServiceClient(cc grpc.ClientConnInterface) CalcServiceClient { return &calcServiceClient{cc} } func (c *calcServiceClient) Add(ctx context.Context, in *AdditionRequest, opts ...grpc.CallOption) (*AdditionResponse, error) { out := new(AdditionResponse) err := c.cc.Invoke(ctx, "/pb.CalcService/Add", in, out, opts...) if err != nil { return nil, err } return out, nil } // CalcServiceServer is the server API for CalcService service. // All implementations must embed UnimplementedCalcServiceServer // for forward compatibility type CalcServiceServer interface { Add(context.Context, *AdditionRequest) (*AdditionResponse, error) mustEmbedUnimplementedCalcServiceServer() } // UnimplementedCalcServiceServer must be embedded to have forward compatible implementations. type UnimplementedCalcServiceServer struct { } func (UnimplementedCalcServiceServer) Add(context.Context, *AdditionRequest) (*AdditionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Add not implemented") } func (UnimplementedCalcServiceServer) mustEmbedUnimplementedCalcServiceServer() {} // UnsafeCalcServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CalcServiceServer will // result in compilation errors. type UnsafeCalcServiceServer interface { mustEmbedUnimplementedCalcServiceServer() } func RegisterCalcServiceServer(s grpc.ServiceRegistrar, srv CalcServiceServer) { s.RegisterService(&CalcService_ServiceDesc, srv) } func _CalcService_Add_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AdditionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CalcServiceServer).Add(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/pb.CalcService/Add", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CalcServiceServer).Add(ctx, req.(*AdditionRequest)) } return interceptor(ctx, in, info, handler) } // CalcService_ServiceDesc is the grpc.ServiceDesc for CalcService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var CalcService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.CalcService", HandlerType: (*CalcServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Add", Handler: _CalcService_Add_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "calc_service.proto", }