v1

package
v0.1.345 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 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 File_component_gantry_v1_gantry_proto protoreflect.FileDescriptor
View Source
var GantryService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "viam.component.gantry.v1.GantryService",
	HandlerType: (*GantryServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPosition",
			Handler:    _GantryService_GetPosition_Handler,
		},
		{
			MethodName: "MoveToPosition",
			Handler:    _GantryService_MoveToPosition_Handler,
		},
		{
			MethodName: "Home",
			Handler:    _GantryService_Home_Handler,
		},
		{
			MethodName: "GetLengths",
			Handler:    _GantryService_GetLengths_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _GantryService_Stop_Handler,
		},
		{
			MethodName: "IsMoving",
			Handler:    _GantryService_IsMoving_Handler,
		},
		{
			MethodName: "DoCommand",
			Handler:    _GantryService_DoCommand_Handler,
		},
		{
			MethodName: "GetGeometries",
			Handler:    _GantryService_GetGeometries_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "component/gantry/v1/gantry.proto",
}

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

Functions

func RegisterGantryServiceHandler

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

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

func RegisterGantryServiceHandlerClient

func RegisterGantryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GantryServiceClient) error

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

func RegisterGantryServiceHandlerFromEndpoint

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

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

func RegisterGantryServiceHandlerServer

func RegisterGantryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GantryServiceServer) error

RegisterGantryServiceHandlerServer registers the http handlers for service GantryService to "mux". UnaryRPC :call GantryServiceServer 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 RegisterGantryServiceHandlerFromEndpoint instead.

func RegisterGantryServiceServer

func RegisterGantryServiceServer(s grpc.ServiceRegistrar, srv GantryServiceServer)

Types

type GantryServiceClient

type GantryServiceClient interface {
	// GetPosition gets the current position of a gantry of the underlying robot.
	GetPosition(ctx context.Context, in *GetPositionRequest, opts ...grpc.CallOption) (*GetPositionResponse, error)
	// MoveToPosition moves a gantry of the underlying robot to the requested position.
	MoveToPosition(ctx context.Context, in *MoveToPositionRequest, opts ...grpc.CallOption) (*MoveToPositionResponse, error)
	// Home runs the homing sequence of a gantry and returns true once it's completed.
	Home(ctx context.Context, in *HomeRequest, opts ...grpc.CallOption) (*HomeResponse, error)
	// GetLengths gets the lengths of a gantry of the underlying robot.
	GetLengths(ctx context.Context, in *GetLengthsRequest, opts ...grpc.CallOption) (*GetLengthsResponse, error)
	// Stop stops a robot's gantry
	Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error)
	// IsMoving reports if a component is in motion
	IsMoving(ctx context.Context, in *IsMovingRequest, opts ...grpc.CallOption) (*IsMovingResponse, error)
	// DoCommand sends/receives arbitrary commands
	DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error)
	// GetGeometries returns the geometries of the component in their current configuration
	GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error)
}

GantryServiceClient is the client API for GantryService 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 GantryServiceServer

type GantryServiceServer interface {
	// GetPosition gets the current position of a gantry of the underlying robot.
	GetPosition(context.Context, *GetPositionRequest) (*GetPositionResponse, error)
	// MoveToPosition moves a gantry of the underlying robot to the requested position.
	MoveToPosition(context.Context, *MoveToPositionRequest) (*MoveToPositionResponse, error)
	// Home runs the homing sequence of a gantry and returns true once it's completed.
	Home(context.Context, *HomeRequest) (*HomeResponse, error)
	// GetLengths gets the lengths of a gantry of the underlying robot.
	GetLengths(context.Context, *GetLengthsRequest) (*GetLengthsResponse, error)
	// Stop stops a robot's gantry
	Stop(context.Context, *StopRequest) (*StopResponse, error)
	// IsMoving reports if a component is in motion
	IsMoving(context.Context, *IsMovingRequest) (*IsMovingResponse, error)
	// DoCommand sends/receives arbitrary commands
	DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error)
	// GetGeometries returns the geometries of the component in their current configuration
	GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error)
	// contains filtered or unexported methods
}

GantryServiceServer is the server API for GantryService service. All implementations must embed UnimplementedGantryServiceServer for forward compatibility

type GetLengthsRequest

type GetLengthsRequest 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 (*GetLengthsRequest) Descriptor deprecated

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

Deprecated: Use GetLengthsRequest.ProtoReflect.Descriptor instead.

func (*GetLengthsRequest) GetExtra

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

func (*GetLengthsRequest) GetName

func (x *GetLengthsRequest) GetName() string

func (*GetLengthsRequest) ProtoMessage

func (*GetLengthsRequest) ProtoMessage()

func (*GetLengthsRequest) ProtoReflect

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

func (*GetLengthsRequest) Reset

func (x *GetLengthsRequest) Reset()

func (*GetLengthsRequest) String

func (x *GetLengthsRequest) String() string

type GetLengthsResponse

type GetLengthsResponse struct {
	LengthsMm []float64 `protobuf:"fixed64,1,rep,packed,name=lengths_mm,json=lengthsMm,proto3" json:"lengths_mm,omitempty"`
	// contains filtered or unexported fields
}

func (*GetLengthsResponse) Descriptor deprecated

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

Deprecated: Use GetLengthsResponse.ProtoReflect.Descriptor instead.

func (*GetLengthsResponse) GetLengthsMm

func (x *GetLengthsResponse) GetLengthsMm() []float64

func (*GetLengthsResponse) ProtoMessage

func (*GetLengthsResponse) ProtoMessage()

func (*GetLengthsResponse) ProtoReflect

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

func (*GetLengthsResponse) Reset

func (x *GetLengthsResponse) Reset()

func (*GetLengthsResponse) String

func (x *GetLengthsResponse) String() string

type GetPositionRequest

type GetPositionRequest 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 (*GetPositionRequest) Descriptor deprecated

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

Deprecated: Use GetPositionRequest.ProtoReflect.Descriptor instead.

func (*GetPositionRequest) GetExtra

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

func (*GetPositionRequest) GetName

func (x *GetPositionRequest) GetName() string

func (*GetPositionRequest) ProtoMessage

func (*GetPositionRequest) ProtoMessage()

func (*GetPositionRequest) ProtoReflect

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

func (*GetPositionRequest) Reset

func (x *GetPositionRequest) Reset()

func (*GetPositionRequest) String

func (x *GetPositionRequest) String() string

type GetPositionResponse

type GetPositionResponse struct {
	PositionsMm []float64 `protobuf:"fixed64,1,rep,packed,name=positions_mm,json=positionsMm,proto3" json:"positions_mm,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPositionResponse) Descriptor deprecated

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

Deprecated: Use GetPositionResponse.ProtoReflect.Descriptor instead.

func (*GetPositionResponse) GetPositionsMm

func (x *GetPositionResponse) GetPositionsMm() []float64

func (*GetPositionResponse) ProtoMessage

func (*GetPositionResponse) ProtoMessage()

func (*GetPositionResponse) ProtoReflect

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

func (*GetPositionResponse) Reset

func (x *GetPositionResponse) Reset()

func (*GetPositionResponse) String

func (x *GetPositionResponse) String() string

type HomeRequest added in v0.1.134

type HomeRequest 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 (*HomeRequest) Descriptor deprecated added in v0.1.134

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

Deprecated: Use HomeRequest.ProtoReflect.Descriptor instead.

func (*HomeRequest) GetExtra added in v0.1.134

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

func (*HomeRequest) GetName added in v0.1.134

func (x *HomeRequest) GetName() string

func (*HomeRequest) ProtoMessage added in v0.1.134

func (*HomeRequest) ProtoMessage()

func (*HomeRequest) ProtoReflect added in v0.1.134

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

func (*HomeRequest) Reset added in v0.1.134

func (x *HomeRequest) Reset()

func (*HomeRequest) String added in v0.1.134

func (x *HomeRequest) String() string

type HomeResponse added in v0.1.134

type HomeResponse struct {

	// A bool describing whether the gantry has completed homing
	Homed bool `protobuf:"varint,1,opt,name=homed,proto3" json:"homed,omitempty"`
	// contains filtered or unexported fields
}

func (*HomeResponse) Descriptor deprecated added in v0.1.134

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

Deprecated: Use HomeResponse.ProtoReflect.Descriptor instead.

func (*HomeResponse) GetHomed added in v0.1.134

func (x *HomeResponse) GetHomed() bool

func (*HomeResponse) ProtoMessage added in v0.1.134

func (*HomeResponse) ProtoMessage()

func (*HomeResponse) ProtoReflect added in v0.1.134

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

func (*HomeResponse) Reset added in v0.1.134

func (x *HomeResponse) Reset()

func (*HomeResponse) String added in v0.1.134

func (x *HomeResponse) String() string

type IsMovingRequest added in v0.1.24

type IsMovingRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*IsMovingRequest) Descriptor deprecated added in v0.1.24

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

Deprecated: Use IsMovingRequest.ProtoReflect.Descriptor instead.

func (*IsMovingRequest) GetName added in v0.1.24

func (x *IsMovingRequest) GetName() string

func (*IsMovingRequest) ProtoMessage added in v0.1.24

func (*IsMovingRequest) ProtoMessage()

func (*IsMovingRequest) ProtoReflect added in v0.1.24

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

func (*IsMovingRequest) Reset added in v0.1.24

func (x *IsMovingRequest) Reset()

func (*IsMovingRequest) String added in v0.1.24

func (x *IsMovingRequest) String() string

type IsMovingResponse added in v0.1.24

type IsMovingResponse struct {
	IsMoving bool `protobuf:"varint,1,opt,name=is_moving,json=isMoving,proto3" json:"is_moving,omitempty"`
	// contains filtered or unexported fields
}

func (*IsMovingResponse) Descriptor deprecated added in v0.1.24

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

Deprecated: Use IsMovingResponse.ProtoReflect.Descriptor instead.

func (*IsMovingResponse) GetIsMoving added in v0.1.24

func (x *IsMovingResponse) GetIsMoving() bool

func (*IsMovingResponse) ProtoMessage added in v0.1.24

func (*IsMovingResponse) ProtoMessage()

func (*IsMovingResponse) ProtoReflect added in v0.1.24

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

func (*IsMovingResponse) Reset added in v0.1.24

func (x *IsMovingResponse) Reset()

func (*IsMovingResponse) String added in v0.1.24

func (x *IsMovingResponse) String() string

type MoveToPositionRequest

type MoveToPositionRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Number of millimeters to move the gantry by respective to each axis.
	PositionsMm []float64 `protobuf:"fixed64,2,rep,packed,name=positions_mm,json=positionsMm,proto3" json:"positions_mm,omitempty"`
	// Speeds to move each gantry axis must match length and order of positions_mm.
	SpeedsMmPerSec []float64 `protobuf:"fixed64,3,rep,packed,name=speeds_mm_per_sec,json=speedsMmPerSec,proto3" json:"speeds_mm_per_sec,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 (*MoveToPositionRequest) Descriptor deprecated

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

Deprecated: Use MoveToPositionRequest.ProtoReflect.Descriptor instead.

func (*MoveToPositionRequest) GetExtra

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

func (*MoveToPositionRequest) GetName

func (x *MoveToPositionRequest) GetName() string

func (*MoveToPositionRequest) GetPositionsMm

func (x *MoveToPositionRequest) GetPositionsMm() []float64

func (*MoveToPositionRequest) GetSpeedsMmPerSec added in v0.1.134

func (x *MoveToPositionRequest) GetSpeedsMmPerSec() []float64

func (*MoveToPositionRequest) ProtoMessage

func (*MoveToPositionRequest) ProtoMessage()

func (*MoveToPositionRequest) ProtoReflect

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

func (*MoveToPositionRequest) Reset

func (x *MoveToPositionRequest) Reset()

func (*MoveToPositionRequest) String

func (x *MoveToPositionRequest) String() string

type MoveToPositionResponse

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

func (*MoveToPositionResponse) Descriptor deprecated

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

Deprecated: Use MoveToPositionResponse.ProtoReflect.Descriptor instead.

func (*MoveToPositionResponse) ProtoMessage

func (*MoveToPositionResponse) ProtoMessage()

func (*MoveToPositionResponse) ProtoReflect

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

func (*MoveToPositionResponse) Reset

func (x *MoveToPositionResponse) Reset()

func (*MoveToPositionResponse) String

func (x *MoveToPositionResponse) String() string

type Status

type Status struct {
	PositionsMm []float64 `protobuf:"fixed64,1,rep,packed,name=positions_mm,json=positionsMm,proto3" json:"positions_mm,omitempty"`
	LengthsMm   []float64 `protobuf:"fixed64,2,rep,packed,name=lengths_mm,json=lengthsMm,proto3" json:"lengths_mm,omitempty"`
	IsMoving    bool      `protobuf:"varint,3,opt,name=is_moving,json=isMoving,proto3" json:"is_moving,omitempty"`
	// contains filtered or unexported fields
}

func (*Status) Descriptor deprecated

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

Deprecated: Use Status.ProtoReflect.Descriptor instead.

func (*Status) GetIsMoving

func (x *Status) GetIsMoving() bool

func (*Status) GetLengthsMm

func (x *Status) GetLengthsMm() []float64

func (*Status) GetPositionsMm

func (x *Status) GetPositionsMm() []float64

func (*Status) ProtoMessage

func (*Status) ProtoMessage()

func (*Status) ProtoReflect

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

func (*Status) Reset

func (x *Status) Reset()

func (*Status) String

func (x *Status) String() string

type StopRequest

type StopRequest struct {

	// Name of a gantry
	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 (*StopRequest) Descriptor deprecated

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

Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.

func (*StopRequest) GetExtra

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

func (*StopRequest) GetName

func (x *StopRequest) GetName() string

func (*StopRequest) ProtoMessage

func (*StopRequest) ProtoMessage()

func (*StopRequest) ProtoReflect

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

func (*StopRequest) Reset

func (x *StopRequest) Reset()

func (*StopRequest) String

func (x *StopRequest) String() string

type StopResponse

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

func (*StopResponse) Descriptor deprecated

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

Deprecated: Use StopResponse.ProtoReflect.Descriptor instead.

func (*StopResponse) ProtoMessage

func (*StopResponse) ProtoMessage()

func (*StopResponse) ProtoReflect

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

func (*StopResponse) Reset

func (x *StopResponse) Reset()

func (*StopResponse) String

func (x *StopResponse) String() string

type UnimplementedGantryServiceServer

type UnimplementedGantryServiceServer struct {
}

UnimplementedGantryServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedGantryServiceServer) DoCommand added in v0.1.79

func (UnimplementedGantryServiceServer) GetGeometries added in v0.1.129

func (UnimplementedGantryServiceServer) GetLengths

func (UnimplementedGantryServiceServer) GetPosition

func (UnimplementedGantryServiceServer) Home added in v0.1.134

func (UnimplementedGantryServiceServer) IsMoving added in v0.1.24

func (UnimplementedGantryServiceServer) MoveToPosition

func (UnimplementedGantryServiceServer) Stop

type UnsafeGantryServiceServer

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

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

Jump to

Keyboard shortcuts

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