v1

package
v0.1.28 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2022 License: Apache-2.0 Imports: 18 Imported by: 2

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 File_service_motion_v1_motion_proto protoreflect.FileDescriptor
View Source
var MotionService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "viam.service.motion.v1.MotionService",
	HandlerType: (*MotionServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Move",
			Handler:    _MotionService_Move_Handler,
		},
		{
			MethodName: "MoveSingleComponent",
			Handler:    _MotionService_MoveSingleComponent_Handler,
		},
		{
			MethodName: "GetPose",
			Handler:    _MotionService_GetPose_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "service/motion/v1/motion.proto",
}

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

Functions

func RegisterMotionServiceHandler

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

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

func RegisterMotionServiceHandlerClient

func RegisterMotionServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MotionServiceClient) error

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

func RegisterMotionServiceHandlerFromEndpoint

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

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

func RegisterMotionServiceHandlerServer

func RegisterMotionServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MotionServiceServer) error

RegisterMotionServiceHandlerServer registers the http handlers for service MotionService to "mux". UnaryRPC :call MotionServiceServer 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 RegisterMotionServiceHandlerFromEndpoint instead.

func RegisterMotionServiceServer

func RegisterMotionServiceServer(s grpc.ServiceRegistrar, srv MotionServiceServer)

Types

type GetPoseRequest

type GetPoseRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// the component whose pose is being requested
	ComponentName *v1.ResourceName `protobuf:"bytes,2,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"`
	// the reference frame in which the component's pose
	// should be provided, if unset this defaults
	// to the "world" reference frame
	DestinationFrame string `protobuf:"bytes,3,opt,name=destination_frame,json=destinationFrame,proto3" json:"destination_frame,omitempty"`
	// pose information on any additional reference frames that are needed
	// to compute the component's pose
	SupplementalTransforms []*v1.Transform `` /* 127-byte string literal not displayed */
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPoseRequest) Descriptor deprecated

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

Deprecated: Use GetPoseRequest.ProtoReflect.Descriptor instead.

func (*GetPoseRequest) GetComponentName

func (x *GetPoseRequest) GetComponentName() *v1.ResourceName

func (*GetPoseRequest) GetDestinationFrame

func (x *GetPoseRequest) GetDestinationFrame() string

func (*GetPoseRequest) GetExtra

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

func (*GetPoseRequest) GetName

func (x *GetPoseRequest) GetName() string

func (*GetPoseRequest) GetSupplementalTransforms

func (x *GetPoseRequest) GetSupplementalTransforms() []*v1.Transform

func (*GetPoseRequest) ProtoMessage

func (*GetPoseRequest) ProtoMessage()

func (*GetPoseRequest) ProtoReflect

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

func (*GetPoseRequest) Reset

func (x *GetPoseRequest) Reset()

func (*GetPoseRequest) String

func (x *GetPoseRequest) String() string

type GetPoseResponse

type GetPoseResponse struct {
	Pose *v1.PoseInFrame `protobuf:"bytes,1,opt,name=pose,proto3" json:"pose,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPoseResponse) Descriptor deprecated

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

Deprecated: Use GetPoseResponse.ProtoReflect.Descriptor instead.

func (*GetPoseResponse) GetPose

func (x *GetPoseResponse) GetPose() *v1.PoseInFrame

func (*GetPoseResponse) ProtoMessage

func (*GetPoseResponse) ProtoMessage()

func (*GetPoseResponse) ProtoReflect

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

func (*GetPoseResponse) Reset

func (x *GetPoseResponse) Reset()

func (*GetPoseResponse) String

func (x *GetPoseResponse) String() string

type MotionServiceClient

type MotionServiceClient interface {
	Move(ctx context.Context, in *MoveRequest, opts ...grpc.CallOption) (*MoveResponse, error)
	MoveSingleComponent(ctx context.Context, in *MoveSingleComponentRequest, opts ...grpc.CallOption) (*MoveSingleComponentResponse, error)
	GetPose(ctx context.Context, in *GetPoseRequest, opts ...grpc.CallOption) (*GetPoseResponse, error)
}

MotionServiceClient is the client API for MotionService 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 MotionServiceServer

type MotionServiceServer interface {
	Move(context.Context, *MoveRequest) (*MoveResponse, error)
	MoveSingleComponent(context.Context, *MoveSingleComponentRequest) (*MoveSingleComponentResponse, error)
	GetPose(context.Context, *GetPoseRequest) (*GetPoseResponse, error)
	// contains filtered or unexported methods
}

MotionServiceServer is the server API for MotionService service. All implementations must embed UnimplementedMotionServiceServer for forward compatibility

type MoveRequest

type MoveRequest struct {
	Name          string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Destination   *v1.PoseInFrame  `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
	ComponentName *v1.ResourceName `protobuf:"bytes,3,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"`
	WorldState    *v1.WorldState   `protobuf:"bytes,4,opt,name=world_state,json=worldState,proto3,oneof" json:"world_state,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 (*MoveRequest) Descriptor deprecated

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

Deprecated: Use MoveRequest.ProtoReflect.Descriptor instead.

func (*MoveRequest) GetComponentName

func (x *MoveRequest) GetComponentName() *v1.ResourceName

func (*MoveRequest) GetDestination

func (x *MoveRequest) GetDestination() *v1.PoseInFrame

func (*MoveRequest) GetExtra

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

func (*MoveRequest) GetName

func (x *MoveRequest) GetName() string

func (*MoveRequest) GetWorldState

func (x *MoveRequest) GetWorldState() *v1.WorldState

func (*MoveRequest) ProtoMessage

func (*MoveRequest) ProtoMessage()

func (*MoveRequest) ProtoReflect

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

func (*MoveRequest) Reset

func (x *MoveRequest) Reset()

func (*MoveRequest) String

func (x *MoveRequest) String() string

type MoveResponse

type MoveResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*MoveResponse) Descriptor deprecated

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

Deprecated: Use MoveResponse.ProtoReflect.Descriptor instead.

func (*MoveResponse) GetSuccess

func (x *MoveResponse) GetSuccess() bool

func (*MoveResponse) ProtoMessage

func (*MoveResponse) ProtoMessage()

func (*MoveResponse) ProtoReflect

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

func (*MoveResponse) Reset

func (x *MoveResponse) Reset()

func (*MoveResponse) String

func (x *MoveResponse) String() string

type MoveSingleComponentRequest

type MoveSingleComponentRequest struct {
	Name          string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Destination   *v1.PoseInFrame  `protobuf:"bytes,2,opt,name=destination,proto3" json:"destination,omitempty"`
	ComponentName *v1.ResourceName `protobuf:"bytes,3,opt,name=component_name,json=componentName,proto3" json:"component_name,omitempty"`
	WorldState    *v1.WorldState   `protobuf:"bytes,4,opt,name=world_state,json=worldState,proto3,oneof" json:"world_state,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 (*MoveSingleComponentRequest) Descriptor deprecated

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

Deprecated: Use MoveSingleComponentRequest.ProtoReflect.Descriptor instead.

func (*MoveSingleComponentRequest) GetComponentName

func (x *MoveSingleComponentRequest) GetComponentName() *v1.ResourceName

func (*MoveSingleComponentRequest) GetDestination

func (x *MoveSingleComponentRequest) GetDestination() *v1.PoseInFrame

func (*MoveSingleComponentRequest) GetExtra

func (*MoveSingleComponentRequest) GetName

func (x *MoveSingleComponentRequest) GetName() string

func (*MoveSingleComponentRequest) GetWorldState

func (x *MoveSingleComponentRequest) GetWorldState() *v1.WorldState

func (*MoveSingleComponentRequest) ProtoMessage

func (*MoveSingleComponentRequest) ProtoMessage()

func (*MoveSingleComponentRequest) ProtoReflect

func (*MoveSingleComponentRequest) Reset

func (x *MoveSingleComponentRequest) Reset()

func (*MoveSingleComponentRequest) String

func (x *MoveSingleComponentRequest) String() string

type MoveSingleComponentResponse

type MoveSingleComponentResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*MoveSingleComponentResponse) Descriptor deprecated

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

Deprecated: Use MoveSingleComponentResponse.ProtoReflect.Descriptor instead.

func (*MoveSingleComponentResponse) GetSuccess

func (x *MoveSingleComponentResponse) GetSuccess() bool

func (*MoveSingleComponentResponse) ProtoMessage

func (*MoveSingleComponentResponse) ProtoMessage()

func (*MoveSingleComponentResponse) ProtoReflect

func (*MoveSingleComponentResponse) Reset

func (x *MoveSingleComponentResponse) Reset()

func (*MoveSingleComponentResponse) String

func (x *MoveSingleComponentResponse) String() string

type UnimplementedMotionServiceServer

type UnimplementedMotionServiceServer struct {
}

UnimplementedMotionServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedMotionServiceServer) GetPose

func (UnimplementedMotionServiceServer) Move

type UnsafeMotionServiceServer

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

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

Jump to

Keyboard shortcuts

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