proto

package
v0.0.0-...-d85361f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

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) Descriptor() ([]byte, []int)

Deprecated: Use Cities.ProtoReflect.Descriptor instead.

func (*Cities) GetCities

func (x *Cities) GetCities() []*City

func (*Cities) ProtoMessage

func (*Cities) ProtoMessage()

func (*Cities) ProtoReflect

func (x *Cities) ProtoReflect() protoreflect.Message

func (*Cities) Reset

func (x *Cities) Reset()

func (*Cities) String

func (x *Cities) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use City.ProtoReflect.Descriptor instead.

func (*City) GetId

func (x *City) GetId() string

func (*City) GetName

func (x *City) GetName() string

func (*City) ProtoMessage

func (*City) ProtoMessage()

func (*City) ProtoReflect

func (x *City) ProtoReflect() protoreflect.Message

func (*City) Reset

func (x *City) Reset()

func (*City) String

func (x *City) String() string

type CityRead

type CityRead struct {
	// contains filtered or unexported fields
}

func (*CityRead) Descriptor deprecated

func (*CityRead) Descriptor() ([]byte, []int)

Deprecated: Use CityRead.ProtoReflect.Descriptor instead.

func (*CityRead) ProtoMessage

func (*CityRead) ProtoMessage()

func (*CityRead) ProtoReflect

func (x *CityRead) ProtoReflect() protoreflect.Message

func (*CityRead) Reset

func (x *CityRead) Reset()

func (*CityRead) String

func (x *CityRead) String() string

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.

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.

func (UnimplementedCityServiceServer) ReadAll

func (UnimplementedCityServiceServer) Save

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL