v1

package
v0.1.60 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2023 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	Mode_name = map[int32]string{
		0: "MODE_UNSPECIFIED",
		1: "MODE_MANUAL",
		2: "MODE_WAYPOINT",
	}
	Mode_value = map[string]int32{
		"MODE_UNSPECIFIED": 0,
		"MODE_MANUAL":      1,
		"MODE_WAYPOINT":    2,
	}
)

Enum value maps for Mode.

View Source
var File_service_navigation_v1_navigation_proto protoreflect.FileDescriptor
View Source
var NavigationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "viam.service.navigation.v1.NavigationService",
	HandlerType: (*NavigationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetMode",
			Handler:    _NavigationService_GetMode_Handler,
		},
		{
			MethodName: "SetMode",
			Handler:    _NavigationService_SetMode_Handler,
		},
		{
			MethodName: "GetLocation",
			Handler:    _NavigationService_GetLocation_Handler,
		},
		{
			MethodName: "GetWaypoints",
			Handler:    _NavigationService_GetWaypoints_Handler,
		},
		{
			MethodName: "AddWaypoint",
			Handler:    _NavigationService_AddWaypoint_Handler,
		},
		{
			MethodName: "RemoveWaypoint",
			Handler:    _NavigationService_RemoveWaypoint_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "service/navigation/v1/navigation.proto",
}

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

Functions

func RegisterNavigationServiceHandler

func RegisterNavigationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterNavigationServiceHandler registers the http handlers for service NavigationService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterNavigationServiceHandlerClient

func RegisterNavigationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NavigationServiceClient) error

RegisterNavigationServiceHandlerClient registers the http handlers for service NavigationService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NavigationServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NavigationServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "NavigationServiceClient" to call the correct interceptors.

func RegisterNavigationServiceHandlerFromEndpoint

func RegisterNavigationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterNavigationServiceHandlerFromEndpoint is same as RegisterNavigationServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterNavigationServiceHandlerServer

func RegisterNavigationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NavigationServiceServer) error

RegisterNavigationServiceHandlerServer registers the http handlers for service NavigationService to "mux". UnaryRPC :call NavigationServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNavigationServiceHandlerFromEndpoint instead.

func RegisterNavigationServiceServer

func RegisterNavigationServiceServer(s grpc.ServiceRegistrar, srv NavigationServiceServer)

Types

type AddWaypointRequest

type AddWaypointRequest struct {
	Name     string       `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Location *v1.GeoPoint `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*AddWaypointRequest) Descriptor deprecated

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

Deprecated: Use AddWaypointRequest.ProtoReflect.Descriptor instead.

func (*AddWaypointRequest) GetExtra added in v0.1.6

func (x *AddWaypointRequest) GetExtra() *structpb.Struct

func (*AddWaypointRequest) GetLocation

func (x *AddWaypointRequest) GetLocation() *v1.GeoPoint

func (*AddWaypointRequest) GetName

func (x *AddWaypointRequest) GetName() string

func (*AddWaypointRequest) ProtoMessage

func (*AddWaypointRequest) ProtoMessage()

func (*AddWaypointRequest) ProtoReflect

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

func (*AddWaypointRequest) Reset

func (x *AddWaypointRequest) Reset()

func (*AddWaypointRequest) String

func (x *AddWaypointRequest) String() string

type AddWaypointResponse

type AddWaypointResponse struct {
	// contains filtered or unexported fields
}

func (*AddWaypointResponse) Descriptor deprecated

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

Deprecated: Use AddWaypointResponse.ProtoReflect.Descriptor instead.

func (*AddWaypointResponse) ProtoMessage

func (*AddWaypointResponse) ProtoMessage()

func (*AddWaypointResponse) ProtoReflect

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

func (*AddWaypointResponse) Reset

func (x *AddWaypointResponse) Reset()

func (*AddWaypointResponse) String

func (x *AddWaypointResponse) String() string

type GetLocationRequest

type GetLocationRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*GetLocationRequest) Descriptor deprecated

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

Deprecated: Use GetLocationRequest.ProtoReflect.Descriptor instead.

func (*GetLocationRequest) GetExtra added in v0.1.6

func (x *GetLocationRequest) GetExtra() *structpb.Struct

func (*GetLocationRequest) GetName

func (x *GetLocationRequest) GetName() string

func (*GetLocationRequest) ProtoMessage

func (*GetLocationRequest) ProtoMessage()

func (*GetLocationRequest) ProtoReflect

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

func (*GetLocationRequest) Reset

func (x *GetLocationRequest) Reset()

func (*GetLocationRequest) String

func (x *GetLocationRequest) String() string

type GetLocationResponse

type GetLocationResponse struct {
	Location *v1.GeoPoint `protobuf:"bytes,1,opt,name=location,proto3" json:"location,omitempty"`
	// contains filtered or unexported fields
}

func (*GetLocationResponse) Descriptor deprecated

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

Deprecated: Use GetLocationResponse.ProtoReflect.Descriptor instead.

func (*GetLocationResponse) GetLocation

func (x *GetLocationResponse) GetLocation() *v1.GeoPoint

func (*GetLocationResponse) ProtoMessage

func (*GetLocationResponse) ProtoMessage()

func (*GetLocationResponse) ProtoReflect

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

func (*GetLocationResponse) Reset

func (x *GetLocationResponse) Reset()

func (*GetLocationResponse) String

func (x *GetLocationResponse) String() string

type GetModeRequest

type GetModeRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*GetModeRequest) Descriptor deprecated

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

Deprecated: Use GetModeRequest.ProtoReflect.Descriptor instead.

func (*GetModeRequest) GetExtra added in v0.1.6

func (x *GetModeRequest) GetExtra() *structpb.Struct

func (*GetModeRequest) GetName

func (x *GetModeRequest) GetName() string

func (*GetModeRequest) ProtoMessage

func (*GetModeRequest) ProtoMessage()

func (*GetModeRequest) ProtoReflect

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

func (*GetModeRequest) Reset

func (x *GetModeRequest) Reset()

func (*GetModeRequest) String

func (x *GetModeRequest) String() string

type GetModeResponse

type GetModeResponse struct {
	Mode Mode `protobuf:"varint,1,opt,name=mode,proto3,enum=viam.service.navigation.v1.Mode" json:"mode,omitempty"`
	// contains filtered or unexported fields
}

func (*GetModeResponse) Descriptor deprecated

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

Deprecated: Use GetModeResponse.ProtoReflect.Descriptor instead.

func (*GetModeResponse) GetMode

func (x *GetModeResponse) GetMode() Mode

func (*GetModeResponse) ProtoMessage

func (*GetModeResponse) ProtoMessage()

func (*GetModeResponse) ProtoReflect

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

func (*GetModeResponse) Reset

func (x *GetModeResponse) Reset()

func (*GetModeResponse) String

func (x *GetModeResponse) String() string

type GetWaypointsRequest

type GetWaypointsRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*GetWaypointsRequest) Descriptor deprecated

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

Deprecated: Use GetWaypointsRequest.ProtoReflect.Descriptor instead.

func (*GetWaypointsRequest) GetExtra added in v0.1.6

func (x *GetWaypointsRequest) GetExtra() *structpb.Struct

func (*GetWaypointsRequest) GetName

func (x *GetWaypointsRequest) GetName() string

func (*GetWaypointsRequest) ProtoMessage

func (*GetWaypointsRequest) ProtoMessage()

func (*GetWaypointsRequest) ProtoReflect

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

func (*GetWaypointsRequest) Reset

func (x *GetWaypointsRequest) Reset()

func (*GetWaypointsRequest) String

func (x *GetWaypointsRequest) String() string

type GetWaypointsResponse

type GetWaypointsResponse struct {
	Waypoints []*Waypoint `protobuf:"bytes,1,rep,name=waypoints,proto3" json:"waypoints,omitempty"`
	// contains filtered or unexported fields
}

func (*GetWaypointsResponse) Descriptor deprecated

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

Deprecated: Use GetWaypointsResponse.ProtoReflect.Descriptor instead.

func (*GetWaypointsResponse) GetWaypoints

func (x *GetWaypointsResponse) GetWaypoints() []*Waypoint

func (*GetWaypointsResponse) ProtoMessage

func (*GetWaypointsResponse) ProtoMessage()

func (*GetWaypointsResponse) ProtoReflect

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

func (*GetWaypointsResponse) Reset

func (x *GetWaypointsResponse) Reset()

func (*GetWaypointsResponse) String

func (x *GetWaypointsResponse) String() string

type Mode

type Mode int32
const (
	Mode_MODE_UNSPECIFIED Mode = 0
	Mode_MODE_MANUAL      Mode = 1
	Mode_MODE_WAYPOINT    Mode = 2
)

func (Mode) Descriptor

func (Mode) Descriptor() protoreflect.EnumDescriptor

func (Mode) Enum

func (x Mode) Enum() *Mode

func (Mode) EnumDescriptor deprecated

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

Deprecated: Use Mode.Descriptor instead.

func (Mode) Number

func (x Mode) Number() protoreflect.EnumNumber

func (Mode) String

func (x Mode) String() string

func (Mode) Type

func (Mode) Type() protoreflect.EnumType
type NavigationServiceClient interface {
	GetMode(ctx context.Context, in *GetModeRequest, opts ...grpc.CallOption) (*GetModeResponse, error)
	SetMode(ctx context.Context, in *SetModeRequest, opts ...grpc.CallOption) (*SetModeResponse, error)
	GetLocation(ctx context.Context, in *GetLocationRequest, opts ...grpc.CallOption) (*GetLocationResponse, error)
	GetWaypoints(ctx context.Context, in *GetWaypointsRequest, opts ...grpc.CallOption) (*GetWaypointsResponse, error)
	AddWaypoint(ctx context.Context, in *AddWaypointRequest, opts ...grpc.CallOption) (*AddWaypointResponse, error)
	RemoveWaypoint(ctx context.Context, in *RemoveWaypointRequest, opts ...grpc.CallOption) (*RemoveWaypointResponse, error)
}

NavigationServiceClient is the client API for NavigationService 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 NavigationServiceServer interface {
	GetMode(context.Context, *GetModeRequest) (*GetModeResponse, error)
	SetMode(context.Context, *SetModeRequest) (*SetModeResponse, error)
	GetLocation(context.Context, *GetLocationRequest) (*GetLocationResponse, error)
	GetWaypoints(context.Context, *GetWaypointsRequest) (*GetWaypointsResponse, error)
	AddWaypoint(context.Context, *AddWaypointRequest) (*AddWaypointResponse, error)
	RemoveWaypoint(context.Context, *RemoveWaypointRequest) (*RemoveWaypointResponse, error)
	// contains filtered or unexported methods
}

NavigationServiceServer is the server API for NavigationService service. All implementations must embed UnimplementedNavigationServiceServer for forward compatibility

type RemoveWaypointRequest

type RemoveWaypointRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Id   string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*RemoveWaypointRequest) Descriptor deprecated

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

Deprecated: Use RemoveWaypointRequest.ProtoReflect.Descriptor instead.

func (*RemoveWaypointRequest) GetExtra added in v0.1.6

func (x *RemoveWaypointRequest) GetExtra() *structpb.Struct

func (*RemoveWaypointRequest) GetId

func (x *RemoveWaypointRequest) GetId() string

func (*RemoveWaypointRequest) GetName

func (x *RemoveWaypointRequest) GetName() string

func (*RemoveWaypointRequest) ProtoMessage

func (*RemoveWaypointRequest) ProtoMessage()

func (*RemoveWaypointRequest) ProtoReflect

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

func (*RemoveWaypointRequest) Reset

func (x *RemoveWaypointRequest) Reset()

func (*RemoveWaypointRequest) String

func (x *RemoveWaypointRequest) String() string

type RemoveWaypointResponse

type RemoveWaypointResponse struct {
	// contains filtered or unexported fields
}

func (*RemoveWaypointResponse) Descriptor deprecated

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

Deprecated: Use RemoveWaypointResponse.ProtoReflect.Descriptor instead.

func (*RemoveWaypointResponse) ProtoMessage

func (*RemoveWaypointResponse) ProtoMessage()

func (*RemoveWaypointResponse) ProtoReflect

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

func (*RemoveWaypointResponse) Reset

func (x *RemoveWaypointResponse) Reset()

func (*RemoveWaypointResponse) String

func (x *RemoveWaypointResponse) String() string

type SetModeRequest

type SetModeRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Mode Mode   `protobuf:"varint,2,opt,name=mode,proto3,enum=viam.service.navigation.v1.Mode" json:"mode,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*SetModeRequest) Descriptor deprecated

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

Deprecated: Use SetModeRequest.ProtoReflect.Descriptor instead.

func (*SetModeRequest) GetExtra added in v0.1.6

func (x *SetModeRequest) GetExtra() *structpb.Struct

func (*SetModeRequest) GetMode

func (x *SetModeRequest) GetMode() Mode

func (*SetModeRequest) GetName

func (x *SetModeRequest) GetName() string

func (*SetModeRequest) ProtoMessage

func (*SetModeRequest) ProtoMessage()

func (*SetModeRequest) ProtoReflect

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

func (*SetModeRequest) Reset

func (x *SetModeRequest) Reset()

func (*SetModeRequest) String

func (x *SetModeRequest) String() string

type SetModeResponse

type SetModeResponse struct {
	// contains filtered or unexported fields
}

func (*SetModeResponse) Descriptor deprecated

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

Deprecated: Use SetModeResponse.ProtoReflect.Descriptor instead.

func (*SetModeResponse) ProtoMessage

func (*SetModeResponse) ProtoMessage()

func (*SetModeResponse) ProtoReflect

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

func (*SetModeResponse) Reset

func (x *SetModeResponse) Reset()

func (*SetModeResponse) String

func (x *SetModeResponse) String() string

type UnimplementedNavigationServiceServer

type UnimplementedNavigationServiceServer struct {
}

UnimplementedNavigationServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedNavigationServiceServer) AddWaypoint

func (UnimplementedNavigationServiceServer) GetLocation

func (UnimplementedNavigationServiceServer) GetMode

func (UnimplementedNavigationServiceServer) GetWaypoints

func (UnimplementedNavigationServiceServer) RemoveWaypoint

func (UnimplementedNavigationServiceServer) SetMode

type UnsafeNavigationServiceServer

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

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

type Waypoint

type Waypoint struct {
	Id       string       `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Location *v1.GeoPoint `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
	// contains filtered or unexported fields
}

func (*Waypoint) Descriptor deprecated

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

Deprecated: Use Waypoint.ProtoReflect.Descriptor instead.

func (*Waypoint) GetId

func (x *Waypoint) GetId() string

func (*Waypoint) GetLocation

func (x *Waypoint) GetLocation() *v1.GeoPoint

func (*Waypoint) ProtoMessage

func (*Waypoint) ProtoMessage()

func (*Waypoint) ProtoReflect

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

func (*Waypoint) Reset

func (x *Waypoint) Reset()

func (*Waypoint) String

func (x *Waypoint) String() string

Jump to

Keyboard shortcuts

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