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