pb

package
Version: v0.0.0-...-b149039 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PortGuide_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pds.PortGuide",
	HandlerType: (*PortGuideServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SetByKey",
			Handler:    _PortGuide_SetByKey_Handler,
		},
		{
			MethodName: "GetByKey",
			Handler:    _PortGuide_GetByKey_Handler,
		},
		{
			MethodName: "GetByName",
			Handler:    _PortGuide_GetByName_Handler,
		},
		{
			MethodName: "FindNearest",
			Handler:    _PortGuide_FindNearest_Handler,
		},
		{
			MethodName: "FindInCircle",
			Handler:    _PortGuide_FindInCircle_Handler,
		},
		{
			MethodName: "FindText",
			Handler:    _PortGuide_FindText_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "RecordList",
			Handler:       _PortGuide_RecordList_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "pds.proto",
}

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

View Source
var ToolGuide_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pds.ToolGuide",
	HandlerType: (*ToolGuideServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _ToolGuide_Ping_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pds.proto",
}

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

Functions

func RegisterPortGuideServer

func RegisterPortGuideServer(s grpc.ServiceRegistrar, srv PortGuideServer)

func RegisterToolGuideServer

func RegisterToolGuideServer(s grpc.ServiceRegistrar, srv ToolGuideServer)

Types

type Circle

type Circle struct {
	Center *Point  `protobuf:"bytes,1,opt,name=center,proto3" json:"center,omitempty"`
	Radius float32 `protobuf:"fixed32,2,opt,name=radius,proto3" json:"radius,omitempty"`
	// contains filtered or unexported fields
}

Circle with center at given Point, and radius in meters.

func (*Circle) Descriptor deprecated

This method has been deprecated.
func (*Circle) Descriptor() ([]byte, []int)

Deprecated: Use Circle.ProtoReflect.Descriptor instead.

func (*Circle) GetCenter

func (x *Circle) GetCenter() *Point

func (*Circle) GetRadius

func (x *Circle) GetRadius() float32

func (*Circle) ProtoMessage

func (*Circle) ProtoMessage()

func (*Circle) ProtoReflect

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

func (*Circle) Reset

func (x *Circle) Reset()

func (*Circle) String

func (x *Circle) String() string

type Content

type Content struct {
	Value []byte `protobuf:"bytes,1,opt,name=Value,proto3" json:"Value,omitempty"`
	// contains filtered or unexported fields
}

Ping message content.

func (*Content) Descriptor deprecated

This method has been deprecated.
func (*Content) Descriptor() ([]byte, []int)

Deprecated: Use Content.ProtoReflect.Descriptor instead.

func (*Content) GetValue

func (x *Content) GetValue() []byte

func (*Content) ProtoMessage

func (*Content) ProtoMessage()

func (*Content) ProtoReflect

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

func (*Content) Reset

func (x *Content) Reset()

func (*Content) String

func (x *Content) String() string

type Key

type Key struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Port key.

func (*Key) Descriptor deprecated

This method has been deprecated.
func (*Key) Descriptor() ([]byte, []int)

Deprecated: Use Key.ProtoReflect.Descriptor instead.

func (*Key) GetValue

func (x *Key) GetValue() string

func (*Key) ProtoMessage

func (*Key) ProtoMessage()

func (*Key) ProtoReflect

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

func (*Key) Reset

func (x *Key) Reset()

func (*Key) String

func (x *Key) String() string

type Name

type Name struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Port name.

func (*Name) Descriptor deprecated

This method has been deprecated.
func (*Name) Descriptor() ([]byte, []int)

Deprecated: Use Name.ProtoReflect.Descriptor instead.

func (*Name) GetValue

func (x *Name) GetValue() string

func (*Name) ProtoMessage

func (*Name) ProtoMessage()

func (*Name) ProtoReflect

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

func (*Name) Reset

func (x *Name) Reset()

func (*Name) String

func (x *Name) String() string

type Point

type Point struct {
	Latitude  float32 `protobuf:"fixed32,1,opt,name=latitude,proto3" json:"latitude,omitempty"`
	Longitude float32 `protobuf:"fixed32,2,opt,name=longitude,proto3" json:"longitude,omitempty"`
	// contains filtered or unexported fields
}

Point with geo coordinates as latitude-longitude pair.

func (*Point) Descriptor deprecated

This method has been deprecated.
func (*Point) Descriptor() ([]byte, []int)

Deprecated: Use Point.ProtoReflect.Descriptor instead.

func (*Point) GetLatitude

func (x *Point) GetLatitude() float32

func (*Point) GetLongitude

func (x *Point) GetLongitude() float32

func (*Point) ProtoMessage

func (*Point) ProtoMessage()

func (*Point) ProtoReflect

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

func (*Point) Reset

func (x *Point) Reset()

func (*Point) String

func (x *Point) String() string

type Port

type Port struct {
	Name        string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	City        string    `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"`
	Country     string    `protobuf:"bytes,3,opt,name=country,proto3" json:"country,omitempty"`
	Alias       []string  `protobuf:"bytes,4,rep,name=alias,proto3" json:"alias,omitempty"`
	Regions     []string  `protobuf:"bytes,5,rep,name=regions,proto3" json:"regions,omitempty"`
	Coordinates []float32 `protobuf:"fixed32,6,rep,packed,name=coordinates,proto3" json:"coordinates,omitempty"`
	Province    string    `protobuf:"bytes,7,opt,name=province,proto3" json:"province,omitempty"`
	Timezone    string    `protobuf:"bytes,8,opt,name=timezone,proto3" json:"timezone,omitempty"`
	Unlocs      []string  `protobuf:"bytes,9,rep,name=unlocs,proto3" json:"unlocs,omitempty"`
	Code        string    `protobuf:"bytes,10,opt,name=code,proto3" json:"code,omitempty"`
	// contains filtered or unexported fields
}

Port description.

func (*Port) Descriptor deprecated

This method has been 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() []float32

func (*Port) GetCountry

func (x *Port) GetCountry() 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 PortGuideClient

type PortGuideClient interface {
	// Accepts a stream of Ports and adds them to map.
	RecordList(ctx context.Context, opts ...grpc.CallOption) (PortGuide_RecordListClient, error)
	// Stores Port to map and return associated key.
	SetByKey(ctx context.Context, in *Port, opts ...grpc.CallOption) (*Key, error)
	// Returns Port by associated key.
	GetByKey(ctx context.Context, in *Key, opts ...grpc.CallOption) (*Port, error)
	// Returns Port by associated name.
	GetByName(ctx context.Context, in *Name, opts ...grpc.CallOption) (*Port, error)
	// Finds nearest Port to given coordinates.
	FindNearest(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Port, error)
	// Finds all ports in given circle.
	FindInCircle(ctx context.Context, in *Circle, opts ...grpc.CallOption) (*Ports, error)
	// Finds all ports each of which contains given text
	// in one of the fields: name, city, province, country.
	FindText(ctx context.Context, in *Quest, opts ...grpc.CallOption) (*Ports, error)
}

PortGuideClient is the client API for PortGuide 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 NewPortGuideClient

func NewPortGuideClient(cc grpc.ClientConnInterface) PortGuideClient

type PortGuideServer

type PortGuideServer interface {
	// Accepts a stream of Ports and adds them to map.
	RecordList(PortGuide_RecordListServer) error
	// Stores Port to map and return associated key.
	SetByKey(context.Context, *Port) (*Key, error)
	// Returns Port by associated key.
	GetByKey(context.Context, *Key) (*Port, error)
	// Returns Port by associated name.
	GetByName(context.Context, *Name) (*Port, error)
	// Finds nearest Port to given coordinates.
	FindNearest(context.Context, *Point) (*Port, error)
	// Finds all ports in given circle.
	FindInCircle(context.Context, *Circle) (*Ports, error)
	// Finds all ports each of which contains given text
	// in one of the fields: name, city, province, country.
	FindText(context.Context, *Quest) (*Ports, error)
	// contains filtered or unexported methods
}

PortGuideServer is the server API for PortGuide service. All implementations must embed UnimplementedPortGuideServer for forward compatibility

type PortGuide_RecordListClient

type PortGuide_RecordListClient interface {
	Send(*Port) error
	CloseAndRecv() (*Summary, error)
	grpc.ClientStream
}

type PortGuide_RecordListServer

type PortGuide_RecordListServer interface {
	SendAndClose(*Summary) error
	Recv() (*Port, error)
	grpc.ServerStream
}

type Ports

type Ports struct {
	List []*Port `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
	// contains filtered or unexported fields
}

List on founded ports for given condition.

func (*Ports) Descriptor deprecated

This method has been deprecated.
func (*Ports) Descriptor() ([]byte, []int)

Deprecated: Use Ports.ProtoReflect.Descriptor instead.

func (*Ports) GetList

func (x *Ports) GetList() []*Port

func (*Ports) ProtoMessage

func (*Ports) ProtoMessage()

func (*Ports) ProtoReflect

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

func (*Ports) Reset

func (x *Ports) Reset()

func (*Ports) String

func (x *Ports) String() string

type Quest

type Quest struct {
	Value     string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	Sensitive bool   `protobuf:"varint,2,opt,name=sensitive,proto3" json:"sensitive,omitempty"`
	Whole     bool   `protobuf:"varint,3,opt,name=whole,proto3" json:"whole,omitempty"`
	// contains filtered or unexported fields
}

Quest with text to find in object fields.

func (*Quest) Descriptor deprecated

This method has been deprecated.
func (*Quest) Descriptor() ([]byte, []int)

Deprecated: Use Quest.ProtoReflect.Descriptor instead.

func (*Quest) GetSensitive

func (x *Quest) GetSensitive() bool

func (*Quest) GetValue

func (x *Quest) GetValue() string

func (*Quest) GetWhole

func (x *Quest) GetWhole() bool

func (*Quest) ProtoMessage

func (*Quest) ProtoMessage()

func (*Quest) ProtoReflect

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

func (*Quest) Reset

func (x *Quest) Reset()

func (*Quest) String

func (x *Quest) String() string

type Summary

type Summary struct {

	// The number of ports received.
	PortCount int32 `protobuf:"varint,1,opt,name=port_count,json=portCount,proto3" json:"port_count,omitempty"`
	// The duration of the traversal in milliseconds.
	ElapsedTime int32 `protobuf:"varint,2,opt,name=elapsed_time,json=elapsedTime,proto3" json:"elapsed_time,omitempty"`
	// contains filtered or unexported fields
}

Summary result of ports streaming.

func (*Summary) Descriptor deprecated

This method has been deprecated.
func (*Summary) Descriptor() ([]byte, []int)

Deprecated: Use Summary.ProtoReflect.Descriptor instead.

func (*Summary) GetElapsedTime

func (x *Summary) GetElapsedTime() int32

func (*Summary) GetPortCount

func (x *Summary) GetPortCount() int32

func (*Summary) ProtoMessage

func (*Summary) ProtoMessage()

func (*Summary) ProtoReflect

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

func (*Summary) Reset

func (x *Summary) Reset()

func (*Summary) String

func (x *Summary) String() string

type ToolGuideClient

type ToolGuideClient interface {
	// Check up service health.
	Ping(ctx context.Context, in *Content, opts ...grpc.CallOption) (*Content, error)
}

ToolGuideClient is the client API for ToolGuide 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 NewToolGuideClient

func NewToolGuideClient(cc grpc.ClientConnInterface) ToolGuideClient

type ToolGuideServer

type ToolGuideServer interface {
	// Check up service health.
	Ping(context.Context, *Content) (*Content, error)
	// contains filtered or unexported methods
}

ToolGuideServer is the server API for ToolGuide service. All implementations must embed UnimplementedToolGuideServer for forward compatibility

type UnimplementedPortGuideServer

type UnimplementedPortGuideServer struct {
}

UnimplementedPortGuideServer must be embedded to have forward compatible implementations.

func (UnimplementedPortGuideServer) FindInCircle

func (UnimplementedPortGuideServer) FindNearest

func (UnimplementedPortGuideServer) FindText

func (UnimplementedPortGuideServer) GetByKey

func (UnimplementedPortGuideServer) GetByName

func (UnimplementedPortGuideServer) RecordList

func (UnimplementedPortGuideServer) SetByKey

type UnimplementedToolGuideServer

type UnimplementedToolGuideServer struct {
}

UnimplementedToolGuideServer must be embedded to have forward compatible implementations.

func (UnimplementedToolGuideServer) Ping

type UnsafePortGuideServer

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

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

type UnsafeToolGuideServer

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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL