Documentation ¶
Index ¶
- Variables
- func RegisterPortServiceServer(s grpc.ServiceRegistrar, srv PortServiceServer)
- type ListPortsResponse
- type Port
- func (*Port) Descriptor() ([]byte, []int)deprecated
- func (x *Port) GetAlias() []string
- func (x *Port) GetCity() string
- func (x *Port) GetCode() string
- func (x *Port) GetCoordinates() []float64
- func (x *Port) GetCountry() string
- func (x *Port) GetId() string
- func (x *Port) GetName() string
- func (x *Port) GetProvince() string
- func (x *Port) GetRegions() []string
- func (x *Port) GetTimezone() string
- func (x *Port) GetUnlocs() []string
- func (*Port) ProtoMessage()
- func (x *Port) ProtoReflect() protoreflect.Message
- func (x *Port) Reset()
- func (x *Port) String() string
- type PortServiceClient
- type PortServiceServer
- type StorePortRequest
- type UnimplementedPortServiceServer
- type UnsafePortServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_ports_proto protoreflect.FileDescriptor
var PortService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ports.PortService", HandlerType: (*PortServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "StorePort", Handler: _PortService_StorePort_Handler, }, { MethodName: "ListPorts", Handler: _PortService_ListPorts_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ports.proto", }
PortService_ServiceDesc is the grpc.ServiceDesc for PortService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPortServiceServer ¶
func RegisterPortServiceServer(s grpc.ServiceRegistrar, srv PortServiceServer)
Types ¶
type ListPortsResponse ¶
type ListPortsResponse struct { Ports []*Port `protobuf:"bytes,1,rep,name=ports,proto3" json:"ports,omitempty"` // contains filtered or unexported fields }
func (*ListPortsResponse) Descriptor
deprecated
func (*ListPortsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListPortsResponse.ProtoReflect.Descriptor instead.
func (*ListPortsResponse) GetPorts ¶
func (x *ListPortsResponse) GetPorts() []*Port
func (*ListPortsResponse) ProtoMessage ¶
func (*ListPortsResponse) ProtoMessage()
func (*ListPortsResponse) ProtoReflect ¶
func (x *ListPortsResponse) ProtoReflect() protoreflect.Message
func (*ListPortsResponse) Reset ¶
func (x *ListPortsResponse) Reset()
func (*ListPortsResponse) String ¶
func (x *ListPortsResponse) String() string
type Port ¶
type Port 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"` City string `protobuf:"bytes,3,opt,name=city,proto3" json:"city,omitempty"` Country string `protobuf:"bytes,4,opt,name=country,proto3" json:"country,omitempty"` Alias []string `protobuf:"bytes,5,rep,name=alias,proto3" json:"alias,omitempty"` Regions []string `protobuf:"bytes,6,rep,name=regions,proto3" json:"regions,omitempty"` Coordinates []float64 `protobuf:"fixed64,7,rep,packed,name=coordinates,proto3" json:"coordinates,omitempty"` Province string `protobuf:"bytes,8,opt,name=province,proto3" json:"province,omitempty"` Timezone string `protobuf:"bytes,9,opt,name=timezone,proto3" json:"timezone,omitempty"` Unlocs []string `protobuf:"bytes,10,rep,name=unlocs,proto3" json:"unlocs,omitempty"` Code string `protobuf:"bytes,11,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*Port) Descriptor
deprecated
func (*Port) GetCoordinates ¶
func (*Port) GetCountry ¶
func (*Port) GetProvince ¶
func (*Port) GetRegions ¶
func (*Port) GetTimezone ¶
func (*Port) ProtoMessage ¶
func (*Port) ProtoMessage()
func (*Port) ProtoReflect ¶
func (x *Port) ProtoReflect() protoreflect.Message
type PortServiceClient ¶
type PortServiceClient interface { StorePort(ctx context.Context, in *StorePortRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) ListPorts(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListPortsResponse, error) }
PortServiceClient is the client API for PortService 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 NewPortServiceClient ¶
func NewPortServiceClient(cc grpc.ClientConnInterface) PortServiceClient
type PortServiceServer ¶
type PortServiceServer interface { StorePort(context.Context, *StorePortRequest) (*emptypb.Empty, error) ListPorts(context.Context, *emptypb.Empty) (*ListPortsResponse, error) // contains filtered or unexported methods }
PortServiceServer is the server API for PortService service. All implementations must embed UnimplementedPortServiceServer for forward compatibility
type StorePortRequest ¶
type StorePortRequest struct { Port *Port `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` // contains filtered or unexported fields }
func (*StorePortRequest) Descriptor
deprecated
func (*StorePortRequest) Descriptor() ([]byte, []int)
Deprecated: Use StorePortRequest.ProtoReflect.Descriptor instead.
func (*StorePortRequest) GetPort ¶
func (x *StorePortRequest) GetPort() *Port
func (*StorePortRequest) ProtoMessage ¶
func (*StorePortRequest) ProtoMessage()
func (*StorePortRequest) ProtoReflect ¶
func (x *StorePortRequest) ProtoReflect() protoreflect.Message
func (*StorePortRequest) Reset ¶
func (x *StorePortRequest) Reset()
func (*StorePortRequest) String ¶
func (x *StorePortRequest) String() string
type UnimplementedPortServiceServer ¶
type UnimplementedPortServiceServer struct { }
UnimplementedPortServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedPortServiceServer) ListPorts ¶
func (UnimplementedPortServiceServer) ListPorts(context.Context, *emptypb.Empty) (*ListPortsResponse, error)
func (UnimplementedPortServiceServer) StorePort ¶
func (UnimplementedPortServiceServer) StorePort(context.Context, *StorePortRequest) (*emptypb.Empty, error)
type UnsafePortServiceServer ¶
type UnsafePortServiceServer interface {
// contains filtered or unexported methods
}
UnsafePortServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PortServiceServer will result in compilation errors.