v1

package
v0.1.185 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 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 File_component_gripper_v1_gripper_proto protoreflect.FileDescriptor
View Source
var GripperService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "viam.component.gripper.v1.GripperService",
	HandlerType: (*GripperServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Open",
			Handler:    _GripperService_Open_Handler,
		},
		{
			MethodName: "Grab",
			Handler:    _GripperService_Grab_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _GripperService_Stop_Handler,
		},
		{
			MethodName: "IsMoving",
			Handler:    _GripperService_IsMoving_Handler,
		},
		{
			MethodName: "DoCommand",
			Handler:    _GripperService_DoCommand_Handler,
		},
		{
			MethodName: "GetGeometries",
			Handler:    _GripperService_GetGeometries_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "component/gripper/v1/gripper.proto",
}

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

Functions

func RegisterGripperServiceHandler

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

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

func RegisterGripperServiceHandlerClient

func RegisterGripperServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GripperServiceClient) error

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

func RegisterGripperServiceHandlerFromEndpoint

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

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

func RegisterGripperServiceHandlerServer

func RegisterGripperServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GripperServiceServer) error

RegisterGripperServiceHandlerServer registers the http handlers for service GripperService to "mux". UnaryRPC :call GripperServiceServer 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 RegisterGripperServiceHandlerFromEndpoint instead.

func RegisterGripperServiceServer

func RegisterGripperServiceServer(s grpc.ServiceRegistrar, srv GripperServiceServer)

Types

type GrabRequest

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

func (*GrabRequest) Descriptor deprecated

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

Deprecated: Use GrabRequest.ProtoReflect.Descriptor instead.

func (*GrabRequest) GetExtra added in v0.1.6

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

func (*GrabRequest) GetName

func (x *GrabRequest) GetName() string

func (*GrabRequest) ProtoMessage

func (*GrabRequest) ProtoMessage()

func (*GrabRequest) ProtoReflect

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

func (*GrabRequest) Reset

func (x *GrabRequest) Reset()

func (*GrabRequest) String

func (x *GrabRequest) String() string

type GrabResponse

type GrabResponse struct {
	Success bool             `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	Extra   *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*GrabResponse) Descriptor deprecated

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

Deprecated: Use GrabResponse.ProtoReflect.Descriptor instead.

func (*GrabResponse) GetExtra added in v0.1.6

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

func (*GrabResponse) GetSuccess

func (x *GrabResponse) GetSuccess() bool

func (*GrabResponse) ProtoMessage

func (*GrabResponse) ProtoMessage()

func (*GrabResponse) ProtoReflect

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

func (*GrabResponse) Reset

func (x *GrabResponse) Reset()

func (*GrabResponse) String

func (x *GrabResponse) String() string

type GripperServiceClient

type GripperServiceClient interface {
	// Open opens a gripper of the underlying robot.
	Open(ctx context.Context, in *OpenRequest, opts ...grpc.CallOption) (*OpenResponse, error)
	// Grab requests a gripper of the underlying robot to grab.
	Grab(ctx context.Context, in *GrabRequest, opts ...grpc.CallOption) (*GrabResponse, error)
	// Stop stops a robot's gripper
	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)
}

GripperServiceClient is the client API for GripperService 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 GripperServiceServer

type GripperServiceServer interface {
	// Open opens a gripper of the underlying robot.
	Open(context.Context, *OpenRequest) (*OpenResponse, error)
	// Grab requests a gripper of the underlying robot to grab.
	Grab(context.Context, *GrabRequest) (*GrabResponse, error)
	// Stop stops a robot's gripper
	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
}

GripperServiceServer is the server API for GripperService service. All implementations must embed UnimplementedGripperServiceServer for forward compatibility

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 OpenRequest

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

func (*OpenRequest) Descriptor deprecated

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

Deprecated: Use OpenRequest.ProtoReflect.Descriptor instead.

func (*OpenRequest) GetExtra added in v0.1.6

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

func (*OpenRequest) GetName

func (x *OpenRequest) GetName() string

func (*OpenRequest) ProtoMessage

func (*OpenRequest) ProtoMessage()

func (*OpenRequest) ProtoReflect

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

func (*OpenRequest) Reset

func (x *OpenRequest) Reset()

func (*OpenRequest) String

func (x *OpenRequest) String() string

type OpenResponse

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

func (*OpenResponse) Descriptor deprecated

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

Deprecated: Use OpenResponse.ProtoReflect.Descriptor instead.

func (*OpenResponse) ProtoMessage

func (*OpenResponse) ProtoMessage()

func (*OpenResponse) ProtoReflect

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

func (*OpenResponse) Reset

func (x *OpenResponse) Reset()

func (*OpenResponse) String

func (x *OpenResponse) String() string

type StopRequest

type StopRequest struct {

	// Name of a gripper
	Name  string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	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 added in v0.1.6

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 UnimplementedGripperServiceServer

type UnimplementedGripperServiceServer struct {
}

UnimplementedGripperServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedGripperServiceServer) DoCommand added in v0.1.79

func (UnimplementedGripperServiceServer) GetGeometries added in v0.1.129

func (UnimplementedGripperServiceServer) Grab

func (UnimplementedGripperServiceServer) IsMoving added in v0.1.24

func (UnimplementedGripperServiceServer) Open

func (UnimplementedGripperServiceServer) Stop

type UnsafeGripperServiceServer

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

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

Jump to

Keyboard shortcuts

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