Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var CityService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "proto.CityService", HandlerType: (*CityServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ReadAll", Handler: _CityService_ReadAll_Handler, }, { MethodName: "Save", Handler: _CityService_Save_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "city.proto", }
CityService_ServiceDesc is the grpc.ServiceDesc for CityService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_city_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCityServiceServer ¶
func RegisterCityServiceServer(s grpc.ServiceRegistrar, srv CityServiceServer)
Types ¶
type Cities ¶
type Cities struct { Cities []*City `protobuf:"bytes,1,rep,name=cities,proto3" json:"cities,omitempty"` // contains filtered or unexported fields }
func (*Cities) Descriptor
deprecated
func (*Cities) ProtoMessage ¶
func (*Cities) ProtoMessage()
func (*Cities) ProtoReflect ¶
func (x *Cities) ProtoReflect() protoreflect.Message
type City ¶
type City struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*City) Descriptor
deprecated
func (*City) ProtoMessage ¶
func (*City) ProtoMessage()
func (*City) ProtoReflect ¶
func (x *City) ProtoReflect() protoreflect.Message
type CityRead ¶
type CityRead struct {
// contains filtered or unexported fields
}
func (*CityRead) Descriptor
deprecated
func (*CityRead) ProtoMessage ¶
func (*CityRead) ProtoMessage()
func (*CityRead) ProtoReflect ¶
func (x *CityRead) ProtoReflect() protoreflect.Message
type CityServiceClient ¶
type CityServiceClient interface { ReadAll(ctx context.Context, in *CityRead, opts ...grpc.CallOption) (*Cities, error) Save(ctx context.Context, in *City, opts ...grpc.CallOption) (*City, error) }
CityServiceClient is the client API for CityService 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.
func NewCityServiceClient ¶
func NewCityServiceClient(cc grpc.ClientConnInterface) CityServiceClient
type CityServiceServer ¶
type CityServiceServer interface { ReadAll(context.Context, *CityRead) (*Cities, error) Save(context.Context, *City) (*City, error) // contains filtered or unexported methods }
CityServiceServer is the server API for CityService service. All implementations must embed UnimplementedCityServiceServer for forward compatibility
type UnimplementedCityServiceServer ¶
type UnimplementedCityServiceServer struct { }
UnimplementedCityServiceServer must be embedded to have forward compatible implementations.
type UnsafeCityServiceServer ¶
type UnsafeCityServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCityServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CityServiceServer will result in compilation errors.