v1

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2022 License: AGPL-3.0 Imports: 17 Imported by: 0

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 CameraService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.api.component.camera.v1.CameraService",
	HandlerType: (*CameraServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetFrame",
			Handler:    _CameraService_GetFrame_Handler,
		},
		{
			MethodName: "RenderFrame",
			Handler:    _CameraService_RenderFrame_Handler,
		},
		{
			MethodName: "GetPointCloud",
			Handler:    _CameraService_GetPointCloud_Handler,
		},
		{
			MethodName: "GetProperties",
			Handler:    _CameraService_GetProperties_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/api/component/camera/v1/camera.proto",
}

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

View Source
var File_proto_api_component_camera_v1_camera_proto protoreflect.FileDescriptor

Functions

func RegisterCameraServiceHandler

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

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

func RegisterCameraServiceHandlerClient

func RegisterCameraServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CameraServiceClient) error

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

func RegisterCameraServiceHandlerFromEndpoint

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

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

func RegisterCameraServiceHandlerServer

func RegisterCameraServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CameraServiceServer) error

RegisterCameraServiceHandlerServer registers the http handlers for service CameraService to "mux". UnaryRPC :call CameraServiceServer 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 RegisterCameraServiceHandlerFromEndpoint instead.

func RegisterCameraServiceServer

func RegisterCameraServiceServer(s grpc.ServiceRegistrar, srv CameraServiceServer)

Types

type CameraServiceClient

type CameraServiceClient interface {
	// GetFrame returns a frame from a camera of the underlying robot. A specific MIME type
	// can be requested but may not necessarily be the same one returned.
	GetFrame(ctx context.Context, in *GetFrameRequest, opts ...grpc.CallOption) (*GetFrameResponse, error)
	// RenderFrame renders a frame from a camera of the underlying robot to an HTTP response. A specific MIME type
	// can be requested but may not necessarily be the same one returned.
	RenderFrame(ctx context.Context, in *RenderFrameRequest, opts ...grpc.CallOption) (*httpbody.HttpBody, error)
	// GetPointCloud returns a point cloud from a camera of the underlying robot. A specific MIME type
	// can be requested but may not necessarily be the same one returned.
	GetPointCloud(ctx context.Context, in *GetPointCloudRequest, opts ...grpc.CallOption) (*GetPointCloudResponse, error)
	// GetProperties returns the camera intrinsic parameters and camera distortion parameters from a camera of the underlying robot, if available.
	GetProperties(ctx context.Context, in *GetPropertiesRequest, opts ...grpc.CallOption) (*GetPropertiesResponse, error)
}

CameraServiceClient is the client API for CameraService 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 CameraServiceServer

type CameraServiceServer interface {
	// GetFrame returns a frame from a camera of the underlying robot. A specific MIME type
	// can be requested but may not necessarily be the same one returned.
	GetFrame(context.Context, *GetFrameRequest) (*GetFrameResponse, error)
	// RenderFrame renders a frame from a camera of the underlying robot to an HTTP response. A specific MIME type
	// can be requested but may not necessarily be the same one returned.
	RenderFrame(context.Context, *RenderFrameRequest) (*httpbody.HttpBody, error)
	// GetPointCloud returns a point cloud from a camera of the underlying robot. A specific MIME type
	// can be requested but may not necessarily be the same one returned.
	GetPointCloud(context.Context, *GetPointCloudRequest) (*GetPointCloudResponse, error)
	// GetProperties returns the camera intrinsic parameters and camera distortion parameters from a camera of the underlying robot, if available.
	GetProperties(context.Context, *GetPropertiesRequest) (*GetPropertiesResponse, error)
	// contains filtered or unexported methods
}

CameraServiceServer is the server API for CameraService service. All implementations must embed UnimplementedCameraServiceServer for forward compatibility

type GetFrameRequest

type GetFrameRequest struct {

	// Name of a camera
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Requested MIME type of response
	MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFrameRequest) Descriptor deprecated

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

Deprecated: Use GetFrameRequest.ProtoReflect.Descriptor instead.

func (*GetFrameRequest) GetMimeType

func (x *GetFrameRequest) GetMimeType() string

func (*GetFrameRequest) GetName

func (x *GetFrameRequest) GetName() string

func (*GetFrameRequest) ProtoMessage

func (*GetFrameRequest) ProtoMessage()

func (*GetFrameRequest) ProtoReflect

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

func (*GetFrameRequest) Reset

func (x *GetFrameRequest) Reset()

func (*GetFrameRequest) String

func (x *GetFrameRequest) String() string

type GetFrameResponse

type GetFrameResponse struct {

	// Actual MIME type of response
	MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// Frame in bytes
	Image []byte `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
	// Width of frame in px
	WidthPx int64 `protobuf:"varint,3,opt,name=width_px,json=widthPx,proto3" json:"width_px,omitempty"`
	// Height of frame in px
	HeightPx int64 `protobuf:"varint,4,opt,name=height_px,json=heightPx,proto3" json:"height_px,omitempty"`
	// contains filtered or unexported fields
}

func (*GetFrameResponse) Descriptor deprecated

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

Deprecated: Use GetFrameResponse.ProtoReflect.Descriptor instead.

func (*GetFrameResponse) GetHeightPx

func (x *GetFrameResponse) GetHeightPx() int64

func (*GetFrameResponse) GetImage

func (x *GetFrameResponse) GetImage() []byte

func (*GetFrameResponse) GetMimeType

func (x *GetFrameResponse) GetMimeType() string

func (*GetFrameResponse) GetWidthPx

func (x *GetFrameResponse) GetWidthPx() int64

func (*GetFrameResponse) ProtoMessage

func (*GetFrameResponse) ProtoMessage()

func (*GetFrameResponse) ProtoReflect

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

func (*GetFrameResponse) Reset

func (x *GetFrameResponse) Reset()

func (*GetFrameResponse) String

func (x *GetFrameResponse) String() string

type GetPointCloudRequest

type GetPointCloudRequest struct {

	// Name of a camera
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Requested MIME type of response
	MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPointCloudRequest) Descriptor deprecated

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

Deprecated: Use GetPointCloudRequest.ProtoReflect.Descriptor instead.

func (*GetPointCloudRequest) GetMimeType

func (x *GetPointCloudRequest) GetMimeType() string

func (*GetPointCloudRequest) GetName

func (x *GetPointCloudRequest) GetName() string

func (*GetPointCloudRequest) ProtoMessage

func (*GetPointCloudRequest) ProtoMessage()

func (*GetPointCloudRequest) ProtoReflect

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

func (*GetPointCloudRequest) Reset

func (x *GetPointCloudRequest) Reset()

func (*GetPointCloudRequest) String

func (x *GetPointCloudRequest) String() string

type GetPointCloudResponse

type GetPointCloudResponse struct {

	// Actual MIME type of response
	MimeType string `protobuf:"bytes,1,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// Frame in bytes
	PointCloud []byte `protobuf:"bytes,2,opt,name=point_cloud,json=pointCloud,proto3" json:"point_cloud,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPointCloudResponse) Descriptor deprecated

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

Deprecated: Use GetPointCloudResponse.ProtoReflect.Descriptor instead.

func (*GetPointCloudResponse) GetMimeType

func (x *GetPointCloudResponse) GetMimeType() string

func (*GetPointCloudResponse) GetPointCloud

func (x *GetPointCloudResponse) GetPointCloud() []byte

func (*GetPointCloudResponse) ProtoMessage

func (*GetPointCloudResponse) ProtoMessage()

func (*GetPointCloudResponse) ProtoReflect

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

func (*GetPointCloudResponse) Reset

func (x *GetPointCloudResponse) Reset()

func (*GetPointCloudResponse) String

func (x *GetPointCloudResponse) String() string

type GetPropertiesRequest

type GetPropertiesRequest struct {

	// Name of a camera
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPropertiesRequest) Descriptor deprecated

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

Deprecated: Use GetPropertiesRequest.ProtoReflect.Descriptor instead.

func (*GetPropertiesRequest) GetName

func (x *GetPropertiesRequest) GetName() string

func (*GetPropertiesRequest) ProtoMessage

func (*GetPropertiesRequest) ProtoMessage()

func (*GetPropertiesRequest) ProtoReflect

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

func (*GetPropertiesRequest) Reset

func (x *GetPropertiesRequest) Reset()

func (*GetPropertiesRequest) String

func (x *GetPropertiesRequest) String() string

type GetPropertiesResponse

type GetPropertiesResponse struct {

	// A boolean property determining whether the camera supports the return of pointcloud data
	SupportsPcd bool `protobuf:"varint,1,opt,name=supports_pcd,json=supportsPcd,proto3" json:"supports_pcd,omitempty"`
	// Parameters for doing a perspective of a 3D scene to a 2D plane
	IntrinsicParameters *IntrinsicParameters `protobuf:"bytes,2,opt,name=intrinsic_parameters,json=intrinsicParameters,proto3" json:"intrinsic_parameters,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPropertiesResponse) Descriptor deprecated

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

Deprecated: Use GetPropertiesResponse.ProtoReflect.Descriptor instead.

func (*GetPropertiesResponse) GetIntrinsicParameters

func (x *GetPropertiesResponse) GetIntrinsicParameters() *IntrinsicParameters

func (*GetPropertiesResponse) GetSupportsPcd added in v0.0.9

func (x *GetPropertiesResponse) GetSupportsPcd() bool

func (*GetPropertiesResponse) ProtoMessage

func (*GetPropertiesResponse) ProtoMessage()

func (*GetPropertiesResponse) ProtoReflect

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

func (*GetPropertiesResponse) Reset

func (x *GetPropertiesResponse) Reset()

func (*GetPropertiesResponse) String

func (x *GetPropertiesResponse) String() string

type IntrinsicParameters

type IntrinsicParameters struct {
	WidthPx   uint32  `protobuf:"varint,1,opt,name=width_px,json=widthPx,proto3" json:"width_px,omitempty"`
	HeightPx  uint32  `protobuf:"varint,2,opt,name=height_px,json=heightPx,proto3" json:"height_px,omitempty"`
	FocalXPx  float64 `protobuf:"fixed64,3,opt,name=focal_x_px,json=focalXPx,proto3" json:"focal_x_px,omitempty"`
	FocalYPx  float64 `protobuf:"fixed64,4,opt,name=focal_y_px,json=focalYPx,proto3" json:"focal_y_px,omitempty"`
	CenterXPx float64 `protobuf:"fixed64,5,opt,name=center_x_px,json=centerXPx,proto3" json:"center_x_px,omitempty"`
	CenterYPx float64 `protobuf:"fixed64,6,opt,name=center_y_px,json=centerYPx,proto3" json:"center_y_px,omitempty"`
	// contains filtered or unexported fields
}

func (*IntrinsicParameters) Descriptor deprecated

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

Deprecated: Use IntrinsicParameters.ProtoReflect.Descriptor instead.

func (*IntrinsicParameters) GetCenterXPx

func (x *IntrinsicParameters) GetCenterXPx() float64

func (*IntrinsicParameters) GetCenterYPx

func (x *IntrinsicParameters) GetCenterYPx() float64

func (*IntrinsicParameters) GetFocalXPx

func (x *IntrinsicParameters) GetFocalXPx() float64

func (*IntrinsicParameters) GetFocalYPx

func (x *IntrinsicParameters) GetFocalYPx() float64

func (*IntrinsicParameters) GetHeightPx

func (x *IntrinsicParameters) GetHeightPx() uint32

func (*IntrinsicParameters) GetWidthPx

func (x *IntrinsicParameters) GetWidthPx() uint32

func (*IntrinsicParameters) ProtoMessage

func (*IntrinsicParameters) ProtoMessage()

func (*IntrinsicParameters) ProtoReflect

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

func (*IntrinsicParameters) Reset

func (x *IntrinsicParameters) Reset()

func (*IntrinsicParameters) String

func (x *IntrinsicParameters) String() string

type Property

type Property struct {

	// Camera video properties
	Video *Video `protobuf:"bytes,1,opt,name=video,proto3" json:"video,omitempty"`
	// contains filtered or unexported fields
}

func (*Property) Descriptor deprecated

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

Deprecated: Use Property.ProtoReflect.Descriptor instead.

func (*Property) GetVideo

func (x *Property) GetVideo() *Video

func (*Property) ProtoMessage

func (*Property) ProtoMessage()

func (*Property) ProtoReflect

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

func (*Property) Reset

func (x *Property) Reset()

func (*Property) String

func (x *Property) String() string

type RenderFrameRequest

type RenderFrameRequest struct {

	// Name of a camera
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Requested MIME type of response
	MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// contains filtered or unexported fields
}

func (*RenderFrameRequest) Descriptor deprecated

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

Deprecated: Use RenderFrameRequest.ProtoReflect.Descriptor instead.

func (*RenderFrameRequest) GetMimeType

func (x *RenderFrameRequest) GetMimeType() string

func (*RenderFrameRequest) GetName

func (x *RenderFrameRequest) GetName() string

func (*RenderFrameRequest) ProtoMessage

func (*RenderFrameRequest) ProtoMessage()

func (*RenderFrameRequest) ProtoReflect

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

func (*RenderFrameRequest) Reset

func (x *RenderFrameRequest) Reset()

func (*RenderFrameRequest) String

func (x *RenderFrameRequest) String() string

type UnimplementedCameraServiceServer

type UnimplementedCameraServiceServer struct {
}

UnimplementedCameraServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCameraServiceServer) GetFrame

func (UnimplementedCameraServiceServer) GetPointCloud

func (UnimplementedCameraServiceServer) GetProperties

func (UnimplementedCameraServiceServer) RenderFrame

type UnsafeCameraServiceServer

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

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

type Video

type Video struct {

	// Video resolution width
	Width int32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"`
	// Video resolution height
	Height int32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	// Video frame format
	FrameFormat string `protobuf:"bytes,3,opt,name=frame_format,json=frameFormat,proto3" json:"frame_format,omitempty"`
	// contains filtered or unexported fields
}

func (*Video) Descriptor deprecated

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

Deprecated: Use Video.ProtoReflect.Descriptor instead.

func (*Video) GetFrameFormat

func (x *Video) GetFrameFormat() string

func (*Video) GetHeight

func (x *Video) GetHeight() int32

func (*Video) GetWidth

func (x *Video) GetWidth() int32

func (*Video) ProtoMessage

func (*Video) ProtoMessage()

func (*Video) ProtoReflect

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

func (*Video) Reset

func (x *Video) Reset()

func (*Video) String

func (x *Video) String() string

type Webcam

type Webcam struct {

	// Camera driver label
	Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
	// Camera driver status
	Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
	// Camera properties
	Properties []*Property `protobuf:"bytes,3,rep,name=properties,proto3" json:"properties,omitempty"`
	// contains filtered or unexported fields
}

func (*Webcam) Descriptor deprecated

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

Deprecated: Use Webcam.ProtoReflect.Descriptor instead.

func (*Webcam) GetLabel

func (x *Webcam) GetLabel() string

func (*Webcam) GetProperties

func (x *Webcam) GetProperties() []*Property

func (*Webcam) GetStatus

func (x *Webcam) GetStatus() string

func (*Webcam) ProtoMessage

func (*Webcam) ProtoMessage()

func (*Webcam) ProtoReflect

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

func (*Webcam) Reset

func (x *Webcam) Reset()

func (*Webcam) String

func (x *Webcam) String() string

type Webcams

type Webcams struct {
	Webcams []*Webcam `protobuf:"bytes,1,rep,name=webcams,proto3" json:"webcams,omitempty"`
	// contains filtered or unexported fields
}

func (*Webcams) Descriptor deprecated

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

Deprecated: Use Webcams.ProtoReflect.Descriptor instead.

func (*Webcams) GetWebcams

func (x *Webcams) GetWebcams() []*Webcam

func (*Webcams) ProtoMessage

func (*Webcams) ProtoMessage()

func (*Webcams) ProtoReflect

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

func (*Webcams) Reset

func (x *Webcams) Reset()

func (*Webcams) String

func (x *Webcams) String() string

Jump to

Keyboard shortcuts

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