route

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_route_proto protoreflect.FileDescriptor
View Source
var Route_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "route.Route",
	HandlerType: (*RouteServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetFeature",
			Handler:    _Route_GetFeature_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ListFeatures",
			Handler:       _Route_ListFeatures_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "RecordRoute",
			Handler:       _Route_RecordRoute_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "RouteChat",
			Handler:       _Route_RouteChat_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "route.proto",
}

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

Functions

func RegisterRouteServer

func RegisterRouteServer(s grpc.ServiceRegistrar, srv RouteServer)

Types

type Feature

type Feature struct {
	Name     string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Location *Point `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
	// contains filtered or unexported fields
}

func (*Feature) Descriptor deprecated

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

Deprecated: Use Feature.ProtoReflect.Descriptor instead.

func (*Feature) GetLocation

func (x *Feature) GetLocation() *Point

func (*Feature) GetName

func (x *Feature) GetName() string

func (*Feature) ProtoMessage

func (*Feature) ProtoMessage()

func (*Feature) ProtoReflect

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

func (*Feature) Reset

func (x *Feature) Reset()

func (*Feature) String

func (x *Feature) String() string

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"`
	// contains filtered or unexported fields
}

func (*Point) Descriptor deprecated

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

Deprecated: Use Point.ProtoReflect.Descriptor instead.

func (*Point) GetLatitude

func (x *Point) GetLatitude() int32

func (*Point) GetLongitude

func (x *Point) GetLongitude() int32

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 Rectangle

type Rectangle struct {
	Lo *Point `protobuf:"bytes,1,opt,name=lo,proto3" json:"lo,omitempty"`
	Hi *Point `protobuf:"bytes,2,opt,name=hi,proto3" json:"hi,omitempty"`
	// contains filtered or unexported fields
}

func (*Rectangle) Descriptor deprecated

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

Deprecated: Use Rectangle.ProtoReflect.Descriptor instead.

func (*Rectangle) GetHi

func (x *Rectangle) GetHi() *Point

func (*Rectangle) GetLo

func (x *Rectangle) GetLo() *Point

func (*Rectangle) ProtoMessage

func (*Rectangle) ProtoMessage()

func (*Rectangle) ProtoReflect

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

func (*Rectangle) Reset

func (x *Rectangle) Reset()

func (*Rectangle) String

func (x *Rectangle) String() string

type RouteClient

type RouteClient interface {
	GetFeature(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Feature, error)
	ListFeatures(ctx context.Context, in *Rectangle, opts ...grpc.CallOption) (Route_ListFeaturesClient, error)
	RecordRoute(ctx context.Context, opts ...grpc.CallOption) (Route_RecordRouteClient, error)
	RouteChat(ctx context.Context, opts ...grpc.CallOption) (Route_RouteChatClient, error)
}

RouteClient is the client API for Route 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 NewRouteClient

func NewRouteClient(cc grpc.ClientConnInterface) RouteClient

type RouteNote

type RouteNote struct {
	Location *Point `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
	Message  string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*RouteNote) Descriptor deprecated

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

Deprecated: Use RouteNote.ProtoReflect.Descriptor instead.

func (*RouteNote) GetLocation

func (x *RouteNote) GetLocation() *Point

func (*RouteNote) GetMessage

func (x *RouteNote) GetMessage() string

func (*RouteNote) ProtoMessage

func (*RouteNote) ProtoMessage()

func (*RouteNote) ProtoReflect

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

func (*RouteNote) Reset

func (x *RouteNote) Reset()

func (*RouteNote) String

func (x *RouteNote) String() string

type RouteServer

type RouteServer interface {
	GetFeature(context.Context, *Point) (*Feature, error)
	ListFeatures(*Rectangle, Route_ListFeaturesServer) error
	RecordRoute(Route_RecordRouteServer) error
	RouteChat(Route_RouteChatServer) error
	// contains filtered or unexported methods
}

RouteServer is the server API for Route service. All implementations must embed UnimplementedRouteServer for forward compatibility

type RouteSummary

type RouteSummary struct {
	PointCount   int32 `protobuf:"varint,1,opt,name=point_count,json=pointCount,proto3" json:"point_count,omitempty"`
	FeatureCount int32 `protobuf:"varint,2,opt,name=feature_count,json=featureCount,proto3" json:"feature_count,omitempty"`
	Distance     int32 `protobuf:"varint,3,opt,name=distance,proto3" json:"distance,omitempty"`
	ElapsedTime  int32 `protobuf:"varint,4,opt,name=elapsed_time,json=elapsedTime,proto3" json:"elapsed_time,omitempty"`
	// contains filtered or unexported fields
}

func (*RouteSummary) Descriptor deprecated

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

Deprecated: Use RouteSummary.ProtoReflect.Descriptor instead.

func (*RouteSummary) GetDistance

func (x *RouteSummary) GetDistance() int32

func (*RouteSummary) GetElapsedTime

func (x *RouteSummary) GetElapsedTime() int32

func (*RouteSummary) GetFeatureCount

func (x *RouteSummary) GetFeatureCount() int32

func (*RouteSummary) GetPointCount

func (x *RouteSummary) GetPointCount() int32

func (*RouteSummary) ProtoMessage

func (*RouteSummary) ProtoMessage()

func (*RouteSummary) ProtoReflect

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

func (*RouteSummary) Reset

func (x *RouteSummary) Reset()

func (*RouteSummary) String

func (x *RouteSummary) String() string

type Route_ListFeaturesClient

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

type Route_ListFeaturesServer

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

type Route_RecordRouteClient

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

type Route_RecordRouteServer

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

type Route_RouteChatClient

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

type Route_RouteChatServer

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

type UnimplementedRouteServer

type UnimplementedRouteServer struct {
}

UnimplementedRouteServer must be embedded to have forward compatible implementations.

func (UnimplementedRouteServer) GetFeature

func (UnimplementedRouteServer) ListFeatures

func (UnimplementedRouteServer) RecordRoute

func (UnimplementedRouteServer) RouteChat

type UnsafeRouteServer added in v0.0.2

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

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

Jump to

Keyboard shortcuts

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