PortController

package
v0.0.0-...-7e252c0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_PortController_proto protoreflect.FileDescriptor
View Source
var PortQueryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "PortController.PortQueryService",
	HandlerType: (*PortQueryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UpdatePort",
			Handler:    _PortQueryService_UpdatePort_Handler,
		},
		{
			MethodName: "GetPort",
			Handler:    _PortQueryService_GetPort_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "PortController.proto",
}

PortQueryService_ServiceDesc is the grpc.ServiceDesc for PortQueryService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPortQueryServiceServer

func RegisterPortQueryServiceServer(s grpc.ServiceRegistrar, srv PortQueryServiceServer)

Types

type Port

type Port struct {
	PortName string `protobuf:"bytes,1,opt,name=PortName,proto3" json:"PortName,omitempty"`
	PortInfo string `protobuf:"bytes,2,opt,name=PortInfo,proto3" json:"PortInfo,omitempty"`
	// contains filtered or unexported fields
}

func (*Port) Descriptor deprecated

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

Deprecated: Use Port.ProtoReflect.Descriptor instead.

func (*Port) GetPortInfo

func (x *Port) GetPortInfo() string

func (*Port) GetPortName

func (x *Port) GetPortName() 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 PortInfo

type PortInfo struct {
	Name        string    `json:"name"`
	City        string    `json:"city"`
	Country     string    `json:"country"`
	Alias       []string  `json:"alias"`
	Regions     []string  `json:"regions"`
	Coordinates []float64 `json:"coordinates"`
	Province    string    `json:"province"`
	Timezone    string    `json:"timezone"`
	Unlocs      []string  `json:"unlocs"`
	Code        string    `json:"code"`
}

func UnMarshalPortInfo

func UnMarshalPortInfo(rawJSON []byte) (PortInfo, error)

type PortQueryServiceClient

type PortQueryServiceClient interface {
	UpdatePort(ctx context.Context, in *Port, opts ...grpc.CallOption) (*Port, error)
	GetPort(ctx context.Context, in *Port, opts ...grpc.CallOption) (*Port, error)
}

PortQueryServiceClient is the client API for PortQueryService 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 PortQueryServiceServer

type PortQueryServiceServer interface {
	UpdatePort(context.Context, *Port) (*Port, error)
	GetPort(context.Context, *Port) (*Port, error)
	// contains filtered or unexported methods
}

PortQueryServiceServer is the server API for PortQueryService service. All implementations must embed UnimplementedPortQueryServiceServer for forward compatibility

type Ports

type Ports = map[string]PortInfo

func UnMarshalWholeMap

func UnMarshalWholeMap(rawJSON []byte) (Ports, error)

type Server

type Server struct {
	Save func(string, PortInfo) (bool, error)
}

func (*Server) GetPort

func (s *Server) GetPort(ctx context.Context, port *Port) (*Port, error)

func (*Server) UpdatePort

func (s *Server) UpdatePort(ctx context.Context, port *Port) (*Port, error)

type UnimplementedPortQueryServiceServer

type UnimplementedPortQueryServiceServer struct {
}

UnimplementedPortQueryServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPortQueryServiceServer) GetPort

func (UnimplementedPortQueryServiceServer) UpdatePort

type UnsafePortQueryServiceServer

type UnsafePortQueryServiceServer interface {
	// contains filtered or unexported methods
}

UnsafePortQueryServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PortQueryServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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