twoway

package
v0.0.0-...-59e6379 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Emiu_Corpus_name = map[int32]string{
	0: "UNIVERSAL",
	1: "WEB",
	2: "IMAGES",
	3: "LOCAL",
	4: "NEWS",
	5: "PRODUCTS",
	6: "VIDEO",
}
View Source
var Emiu_Corpus_value = map[string]int32{
	"UNIVERSAL": 0,
	"WEB":       1,
	"IMAGES":    2,
	"LOCAL":     3,
	"NEWS":      4,
	"PRODUCTS":  5,
	"VIDEO":     6,
}

Functions

func RegisterTwoWayJobServer

func RegisterTwoWayJobServer(s *grpc.Server, srv TwoWayJobServer)

Types

type Emiu

type Emiu struct {
	Value                int32       `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
	Type                 Emiu_Corpus `protobuf:"varint,2,opt,name=type,proto3,enum=twoway.Emiu_Corpus" json:"type,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*Emiu) Descriptor

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

func (*Emiu) GetType

func (m *Emiu) GetType() Emiu_Corpus

func (*Emiu) GetValue

func (m *Emiu) GetValue() int32

func (*Emiu) ProtoMessage

func (*Emiu) ProtoMessage()

func (*Emiu) Reset

func (m *Emiu) Reset()

func (*Emiu) String

func (m *Emiu) String() string

func (*Emiu) XXX_DiscardUnknown

func (m *Emiu) XXX_DiscardUnknown()

func (*Emiu) XXX_Marshal

func (m *Emiu) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Emiu) XXX_Merge

func (m *Emiu) XXX_Merge(src proto.Message)

func (*Emiu) XXX_Size

func (m *Emiu) XXX_Size() int

func (*Emiu) XXX_Unmarshal

func (m *Emiu) XXX_Unmarshal(b []byte) error

type Emiu_Corpus

type Emiu_Corpus int32
const (
	Emiu_UNIVERSAL Emiu_Corpus = 0
	Emiu_WEB       Emiu_Corpus = 1
	Emiu_IMAGES    Emiu_Corpus = 2
	Emiu_LOCAL     Emiu_Corpus = 3
	Emiu_NEWS      Emiu_Corpus = 4
	Emiu_PRODUCTS  Emiu_Corpus = 5
	Emiu_VIDEO     Emiu_Corpus = 6
)

func (Emiu_Corpus) EnumDescriptor

func (Emiu_Corpus) EnumDescriptor() ([]byte, []int)

func (Emiu_Corpus) String

func (x Emiu_Corpus) String() string

type Feature

type Feature struct {
	// The name of the feature.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// The point where the feature is detected.
	Location             *Point   `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Feature) Descriptor

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

func (*Feature) GetLocation

func (m *Feature) GetLocation() *Point

func (*Feature) GetName

func (m *Feature) GetName() string

func (*Feature) ProtoMessage

func (*Feature) ProtoMessage()

func (*Feature) Reset

func (m *Feature) Reset()

func (*Feature) String

func (m *Feature) String() string

func (*Feature) XXX_DiscardUnknown

func (m *Feature) XXX_DiscardUnknown()

func (*Feature) XXX_Marshal

func (m *Feature) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Feature) XXX_Merge

func (m *Feature) XXX_Merge(src proto.Message)

func (*Feature) XXX_Size

func (m *Feature) XXX_Size() int

func (*Feature) XXX_Unmarshal

func (m *Feature) XXX_Unmarshal(b []byte) error

type OneOfMessage

type OneOfMessage struct {
	// Types that are valid to be assigned to TestOneof:
	//	*OneOfMessage_Name
	//	*OneOfMessage_Pt
	TestOneof            isOneOfMessage_TestOneof `protobuf_oneof:"test_oneof"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

func (*OneOfMessage) Descriptor

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

func (*OneOfMessage) GetName

func (m *OneOfMessage) GetName() string

func (*OneOfMessage) GetPt

func (m *OneOfMessage) GetPt() *Point

func (*OneOfMessage) GetTestOneof

func (m *OneOfMessage) GetTestOneof() isOneOfMessage_TestOneof

func (*OneOfMessage) ProtoMessage

func (*OneOfMessage) ProtoMessage()

func (*OneOfMessage) Reset

func (m *OneOfMessage) Reset()

func (*OneOfMessage) String

func (m *OneOfMessage) String() string

func (*OneOfMessage) XXX_DiscardUnknown

func (m *OneOfMessage) XXX_DiscardUnknown()

func (*OneOfMessage) XXX_Marshal

func (m *OneOfMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OneOfMessage) XXX_Merge

func (m *OneOfMessage) XXX_Merge(src proto.Message)

func (*OneOfMessage) XXX_OneofWrappers

func (*OneOfMessage) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*OneOfMessage) XXX_Size

func (m *OneOfMessage) XXX_Size() int

func (*OneOfMessage) XXX_Unmarshal

func (m *OneOfMessage) XXX_Unmarshal(b []byte) error

type OneOfMessage_Name

type OneOfMessage_Name struct {
	Name string `protobuf:"bytes,4,opt,name=name,proto3,oneof"`
}

type OneOfMessage_Pt

type OneOfMessage_Pt struct {
	Pt *Point `protobuf:"bytes,9,opt,name=pt,proto3,oneof"`
}

type Point

type Point struct {
	Latitude             int32    `protobuf:"varint,1,opt,name=latitude,proto3" json:"latitude,omitempty"`
	Longitude            int32    `protobuf:"varint,2,opt,name=longitude,proto3" json:"longitude,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Point) Descriptor

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

func (*Point) GetLatitude

func (m *Point) GetLatitude() int32

func (*Point) GetLongitude

func (m *Point) GetLongitude() int32

func (*Point) ProtoMessage

func (*Point) ProtoMessage()

func (*Point) Reset

func (m *Point) Reset()

func (*Point) String

func (m *Point) String() string

func (*Point) XXX_DiscardUnknown

func (m *Point) XXX_DiscardUnknown()

func (*Point) XXX_Marshal

func (m *Point) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Point) XXX_Merge

func (m *Point) XXX_Merge(src proto.Message)

func (*Point) XXX_Size

func (m *Point) XXX_Size() int

func (*Point) XXX_Unmarshal

func (m *Point) XXX_Unmarshal(b []byte) error

type Rectangle

type Rectangle struct {
	// One corner of the rectangle.
	Lo *Point `protobuf:"bytes,1,opt,name=lo,proto3" json:"lo,omitempty"`
	// The other corner of the rectangle.
	Hi                   *Point   `protobuf:"bytes,2,opt,name=hi,proto3" json:"hi,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Rectangle) Descriptor

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

func (*Rectangle) GetHi

func (m *Rectangle) GetHi() *Point

func (*Rectangle) GetLo

func (m *Rectangle) GetLo() *Point

func (*Rectangle) ProtoMessage

func (*Rectangle) ProtoMessage()

func (*Rectangle) Reset

func (m *Rectangle) Reset()

func (*Rectangle) String

func (m *Rectangle) String() string

func (*Rectangle) XXX_DiscardUnknown

func (m *Rectangle) XXX_DiscardUnknown()

func (*Rectangle) XXX_Marshal

func (m *Rectangle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Rectangle) XXX_Merge

func (m *Rectangle) XXX_Merge(src proto.Message)

func (*Rectangle) XXX_Size

func (m *Rectangle) XXX_Size() int

func (*Rectangle) XXX_Unmarshal

func (m *Rectangle) XXX_Unmarshal(b []byte) error

type RouteNote

type RouteNote struct {
	// The location from which the message is sent.
	Location *Point `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
	// The message to be sent.
	Message              string   `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RouteNote) Descriptor

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

func (*RouteNote) GetLocation

func (m *RouteNote) GetLocation() *Point

func (*RouteNote) GetMessage

func (m *RouteNote) GetMessage() string

func (*RouteNote) ProtoMessage

func (*RouteNote) ProtoMessage()

func (*RouteNote) Reset

func (m *RouteNote) Reset()

func (*RouteNote) String

func (m *RouteNote) String() string

func (*RouteNote) XXX_DiscardUnknown

func (m *RouteNote) XXX_DiscardUnknown()

func (*RouteNote) XXX_Marshal

func (m *RouteNote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RouteNote) XXX_Merge

func (m *RouteNote) XXX_Merge(src proto.Message)

func (*RouteNote) XXX_Size

func (m *RouteNote) XXX_Size() int

func (*RouteNote) XXX_Unmarshal

func (m *RouteNote) XXX_Unmarshal(b []byte) error

type RouteSummary

type RouteSummary struct {
	// The number of points received.
	PointCount int32 `protobuf:"varint,1,opt,name=point_count,json=pointCount,proto3" json:"point_count,omitempty"`
	// The number of known features passed while traversing the route.
	FeatureCount int32 `protobuf:"varint,2,opt,name=feature_count,json=featureCount,proto3" json:"feature_count,omitempty"`
	// The distance covered in metres.
	Distance int32 `protobuf:"varint,3,opt,name=distance,proto3" json:"distance,omitempty"`
	// The duration of the traversal in seconds.
	ElapsedTime          int32    `protobuf:"varint,4,opt,name=elapsed_time,json=elapsedTime,proto3" json:"elapsed_time,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RouteSummary) Descriptor

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

func (*RouteSummary) GetDistance

func (m *RouteSummary) GetDistance() int32

func (*RouteSummary) GetElapsedTime

func (m *RouteSummary) GetElapsedTime() int32

func (*RouteSummary) GetFeatureCount

func (m *RouteSummary) GetFeatureCount() int32

func (*RouteSummary) GetPointCount

func (m *RouteSummary) GetPointCount() int32

func (*RouteSummary) ProtoMessage

func (*RouteSummary) ProtoMessage()

func (*RouteSummary) Reset

func (m *RouteSummary) Reset()

func (*RouteSummary) String

func (m *RouteSummary) String() string

func (*RouteSummary) XXX_DiscardUnknown

func (m *RouteSummary) XXX_DiscardUnknown()

func (*RouteSummary) XXX_Marshal

func (m *RouteSummary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RouteSummary) XXX_Merge

func (m *RouteSummary) XXX_Merge(src proto.Message)

func (*RouteSummary) XXX_Size

func (m *RouteSummary) XXX_Size() int

func (*RouteSummary) XXX_Unmarshal

func (m *RouteSummary) XXX_Unmarshal(b []byte) error

type TwoWayJobClient

type TwoWayJobClient interface {
	// a simple rpc, import from other package
	Simple(ctx context.Context, in *helloworld.HelloRequest, opts ...grpc.CallOption) (*helloworld.HelloReply, error)
	GetFeature(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Feature, error)
	// server-side streaming RPC where the client sends a request to the server and gets a stream to read a sequence of messages back
	ListFeatures(ctx context.Context, in *Rectangle, opts ...grpc.CallOption) (TwoWayJob_ListFeaturesClient, error)
	// client-side streaming RPC where the client writes a sequence of messages and sends them to the server
	RecordRoute(ctx context.Context, opts ...grpc.CallOption) (TwoWayJob_RecordRouteClient, error)
	// bidirectional streaming RPC where both sides send a sequence of messages using a read-write stream
	RouteChat(ctx context.Context, opts ...grpc.CallOption) (TwoWayJob_RouteChatClient, error)
}

TwoWayJobClient is the client API for TwoWayJob service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewTwoWayJobClient

func NewTwoWayJobClient(cc *grpc.ClientConn) TwoWayJobClient

type TwoWayJobServer

type TwoWayJobServer interface {
	// a simple rpc, import from other package
	Simple(context.Context, *helloworld.HelloRequest) (*helloworld.HelloReply, error)
	GetFeature(context.Context, *Point) (*Feature, error)
	// server-side streaming RPC where the client sends a request to the server and gets a stream to read a sequence of messages back
	ListFeatures(*Rectangle, TwoWayJob_ListFeaturesServer) error
	// client-side streaming RPC where the client writes a sequence of messages and sends them to the server
	RecordRoute(TwoWayJob_RecordRouteServer) error
	// bidirectional streaming RPC where both sides send a sequence of messages using a read-write stream
	RouteChat(TwoWayJob_RouteChatServer) error
}

TwoWayJobServer is the server API for TwoWayJob service.

type TwoWayJob_ListFeaturesClient

type TwoWayJob_ListFeaturesClient interface {
	Recv() (*Feature, error)
	grpc.ClientStream
}

type TwoWayJob_ListFeaturesServer

type TwoWayJob_ListFeaturesServer interface {
	Send(*Feature) error
	grpc.ServerStream
}

type TwoWayJob_RecordRouteClient

type TwoWayJob_RecordRouteClient interface {
	Send(*Point) error
	CloseAndRecv() (*RouteSummary, error)
	grpc.ClientStream
}

type TwoWayJob_RecordRouteServer

type TwoWayJob_RecordRouteServer interface {
	SendAndClose(*RouteSummary) error
	Recv() (*Point, error)
	grpc.ServerStream
}

type TwoWayJob_RouteChatClient

type TwoWayJob_RouteChatClient interface {
	Send(*RouteNote) error
	Recv() (*RouteNote, error)
	grpc.ClientStream
}

type TwoWayJob_RouteChatServer

type TwoWayJob_RouteChatServer interface {
	Send(*RouteNote) error
	Recv() (*RouteNote, error)
	grpc.ServerStream
}

type UnimplementedTwoWayJobServer

type UnimplementedTwoWayJobServer struct {
}

UnimplementedTwoWayJobServer can be embedded to have forward compatible implementations.

func (*UnimplementedTwoWayJobServer) GetFeature

func (*UnimplementedTwoWayJobServer) GetFeature(ctx context.Context, req *Point) (*Feature, error)

func (*UnimplementedTwoWayJobServer) ListFeatures

func (*UnimplementedTwoWayJobServer) RecordRoute

func (*UnimplementedTwoWayJobServer) RouteChat

func (*UnimplementedTwoWayJobServer) Simple

Jump to

Keyboard shortcuts

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