proto

package
v0.0.0-...-8a59038 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: MIT Imports: 10 Imported by: 0

README

This package contains the content shared across the services (e.g. models, service definitions)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_port_proto protoreflect.FileDescriptor

Functions

func RegisterStorageServer

func RegisterStorageServer(s grpc.ServiceRegistrar, srv StorageServer)

Types

type Payload

type Payload struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Port *Port  `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"`
	// contains filtered or unexported fields
}

func (*Payload) Descriptor deprecated

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

Deprecated: Use Payload.ProtoReflect.Descriptor instead.

func (*Payload) GetId

func (x *Payload) GetId() string

func (*Payload) GetPort

func (x *Payload) GetPort() *Port

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) ProtoReflect

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

func (*Payload) Reset

func (x *Payload) Reset()

func (*Payload) String

func (x *Payload) String() string

type Port

type Port struct {
	Code        string    `protobuf:"bytes,1,opt,name=code,proto3" json:"code,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"`
	Province    string    `protobuf:"bytes,4,opt,name=province,proto3" json:"province,omitempty"`
	Country     string    `protobuf:"bytes,5,opt,name=country,proto3" json:"country,omitempty"`
	Timezone    string    `protobuf:"bytes,6,opt,name=timezone,proto3" json:"timezone,omitempty"`
	Coordinates []float64 `protobuf:"fixed64,7,rep,packed,name=coordinates,proto3" json:"coordinates,omitempty"`
	Alias       []string  `protobuf:"bytes,8,rep,name=alias,proto3" json:"alias,omitempty"`
	Regions     []string  `protobuf:"bytes,9,rep,name=regions,proto3" json:"regions,omitempty"`
	Unlocs      []string  `protobuf:"bytes,10,rep,name=unlocs,proto3" json:"unlocs,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) 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 StorageClient

type StorageClient interface {
	Load(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Storage_LoadClient, error)
	Save(ctx context.Context, opts ...grpc.CallOption) (Storage_SaveClient, error)
}

StorageClient is the client API for Storage 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 NewStorageClient

func NewStorageClient(cc grpc.ClientConnInterface) StorageClient

type StorageServer

type StorageServer interface {
	Load(*empty.Empty, Storage_LoadServer) error
	Save(Storage_SaveServer) error
	// contains filtered or unexported methods
}

StorageServer is the server API for Storage service. All implementations must embed UnimplementedStorageServer for forward compatibility

type Storage_LoadClient

type Storage_LoadClient interface {
	Recv() (*Payload, error)
	grpc.ClientStream
}

type Storage_LoadServer

type Storage_LoadServer interface {
	Send(*Payload) error
	grpc.ServerStream
}

type Storage_SaveClient

type Storage_SaveClient interface {
	Send(*Payload) error
	CloseAndRecv() (*empty.Empty, error)
	grpc.ClientStream
}

type Storage_SaveServer

type Storage_SaveServer interface {
	SendAndClose(*empty.Empty) error
	Recv() (*Payload, error)
	grpc.ServerStream
}

type UnimplementedStorageServer

type UnimplementedStorageServer struct {
}

UnimplementedStorageServer must be embedded to have forward compatible implementations.

func (UnimplementedStorageServer) Load

func (UnimplementedStorageServer) Save

type UnsafeStorageServer

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

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

Jump to

Keyboard shortcuts

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