portsgrpc

package
v0.0.0-...-80b0eab Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_ports_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Port.ProtoReflect.Descriptor instead.

func (*Port) GetAlias

func (x *Port) GetAlias() []string

func (*Port) GetCity

func (x *Port) GetCity() string

func (*Port) GetCode

func (x *Port) GetCode() string

func (*Port) GetCoordinates

func (x *Port) GetCoordinates() []float64

func (*Port) GetCountry

func (x *Port) GetCountry() string

func (*Port) GetId

func (x *Port) GetId() string

func (*Port) GetName

func (x *Port) GetName() string

func (*Port) GetProvince

func (x *Port) GetProvince() string

func (*Port) GetRegions

func (x *Port) GetRegions() []string

func (*Port) GetTimezone

func (x *Port) GetTimezone() string

func (*Port) GetUnlocs

func (x *Port) GetUnlocs() []string

func (*Port) ProtoMessage

func (*Port) ProtoMessage()

func (*Port) ProtoReflect

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

func (*Port) Reset

func (x *Port) Reset()

func (*Port) String

func (x *Port) String() string

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.

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) StorePort

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.

Jump to

Keyboard shortcuts

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