v1

package
v0.0.0-...-151de34 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2024 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	DisplayService_DisplayBytes_FullMethodName = "/biotinker.component.display.v1.DisplayService/DisplayBytes"
	DisplayService_WriteString_FullMethodName  = "/biotinker.component.display.v1.DisplayService/WriteString"
	DisplayService_DrawLine_FullMethodName     = "/biotinker.component.display.v1.DisplayService/DrawLine"
	DisplayService_Reset_FullMethodName        = "/biotinker.component.display.v1.DisplayService/Reset"
	DisplayService_DoCommand_FullMethodName    = "/biotinker.component.display.v1.DisplayService/DoCommand"
)

Variables

View Source
var DisplayService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "biotinker.component.display.v1.DisplayService",
	HandlerType: (*DisplayServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "DisplayBytes",
			Handler:    _DisplayService_DisplayBytes_Handler,
		},
		{
			MethodName: "WriteString",
			Handler:    _DisplayService_WriteString_Handler,
		},
		{
			MethodName: "DrawLine",
			Handler:    _DisplayService_DrawLine_Handler,
		},
		{
			MethodName: "Reset",
			Handler:    _DisplayService_Reset_Handler,
		},
		{
			MethodName: "DoCommand",
			Handler:    _DisplayService_DoCommand_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "component/display/v1/display.proto",
}

DisplayService_ServiceDesc is the grpc.ServiceDesc for DisplayService 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_component_display_v1_display_proto protoreflect.FileDescriptor

Functions

func RegisterDisplayServiceHandler

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

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

func RegisterDisplayServiceHandlerClient

func RegisterDisplayServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DisplayServiceClient) error

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

func RegisterDisplayServiceHandlerFromEndpoint

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

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

func RegisterDisplayServiceHandlerServer

func RegisterDisplayServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DisplayServiceServer) error

RegisterDisplayServiceHandlerServer registers the http handlers for service DisplayService to "mux". UnaryRPC :call DisplayServiceServer 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 RegisterDisplayServiceHandlerFromEndpoint instead.

func RegisterDisplayServiceServer

func RegisterDisplayServiceServer(s grpc.ServiceRegistrar, srv DisplayServiceServer)

Types

type DisplayBytesRequest

type DisplayBytesRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*DisplayBytesRequest) Descriptor deprecated

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

Deprecated: Use DisplayBytesRequest.ProtoReflect.Descriptor instead.

func (*DisplayBytesRequest) GetData

func (x *DisplayBytesRequest) GetData() []byte

func (*DisplayBytesRequest) GetName

func (x *DisplayBytesRequest) GetName() string

func (*DisplayBytesRequest) ProtoMessage

func (*DisplayBytesRequest) ProtoMessage()

func (*DisplayBytesRequest) ProtoReflect

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

func (*DisplayBytesRequest) Reset

func (x *DisplayBytesRequest) Reset()

func (*DisplayBytesRequest) String

func (x *DisplayBytesRequest) String() string

type DisplayBytesResponse

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

func (*DisplayBytesResponse) Descriptor deprecated

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

Deprecated: Use DisplayBytesResponse.ProtoReflect.Descriptor instead.

func (*DisplayBytesResponse) ProtoMessage

func (*DisplayBytesResponse) ProtoMessage()

func (*DisplayBytesResponse) ProtoReflect

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

func (*DisplayBytesResponse) Reset

func (x *DisplayBytesResponse) Reset()

func (*DisplayBytesResponse) String

func (x *DisplayBytesResponse) String() string

type DisplayServiceClient

type DisplayServiceClient interface {
	DisplayBytes(ctx context.Context, in *DisplayBytesRequest, opts ...grpc.CallOption) (*DisplayBytesResponse, error)
	WriteString(ctx context.Context, in *WriteStringRequest, opts ...grpc.CallOption) (*WriteStringResponse, error)
	DrawLine(ctx context.Context, in *DrawLineRequest, opts ...grpc.CallOption) (*DrawLineResponse, error)
	Reset(ctx context.Context, in *ResetRequest, opts ...grpc.CallOption) (*ResetResponse, error)
	DoCommand(ctx context.Context, in *DoCommandRequest, opts ...grpc.CallOption) (*DoCommandResponse, error)
}

DisplayServiceClient is the client API for DisplayService 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 DisplayServiceServer

type DisplayServiceServer interface {
	DisplayBytes(context.Context, *DisplayBytesRequest) (*DisplayBytesResponse, error)
	WriteString(context.Context, *WriteStringRequest) (*WriteStringResponse, error)
	DrawLine(context.Context, *DrawLineRequest) (*DrawLineResponse, error)
	Reset(context.Context, *ResetRequest) (*ResetResponse, error)
	DoCommand(context.Context, *DoCommandRequest) (*DoCommandResponse, error)
	// contains filtered or unexported methods
}

DisplayServiceServer is the server API for DisplayService service. All implementations must embed UnimplementedDisplayServiceServer for forward compatibility

type DoCommandRequest

type DoCommandRequest struct {
	Name    string           `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Command *structpb.Struct `protobuf:"bytes,2,opt,name=command,proto3" json:"command,omitempty"`
	// contains filtered or unexported fields
}

func (*DoCommandRequest) Descriptor deprecated

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

Deprecated: Use DoCommandRequest.ProtoReflect.Descriptor instead.

func (*DoCommandRequest) GetCommand

func (x *DoCommandRequest) GetCommand() *structpb.Struct

func (*DoCommandRequest) GetName

func (x *DoCommandRequest) GetName() string

func (*DoCommandRequest) ProtoMessage

func (*DoCommandRequest) ProtoMessage()

func (*DoCommandRequest) ProtoReflect

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

func (*DoCommandRequest) Reset

func (x *DoCommandRequest) Reset()

func (*DoCommandRequest) String

func (x *DoCommandRequest) String() string

type DoCommandResponse

type DoCommandResponse struct {
	Result *structpb.Struct `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"`
	// contains filtered or unexported fields
}

func (*DoCommandResponse) Descriptor deprecated

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

Deprecated: Use DoCommandResponse.ProtoReflect.Descriptor instead.

func (*DoCommandResponse) GetResult

func (x *DoCommandResponse) GetResult() *structpb.Struct

func (*DoCommandResponse) ProtoMessage

func (*DoCommandResponse) ProtoMessage()

func (*DoCommandResponse) ProtoReflect

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

func (*DoCommandResponse) Reset

func (x *DoCommandResponse) Reset()

func (*DoCommandResponse) String

func (x *DoCommandResponse) String() string

type DrawLineRequest

type DrawLineRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	X1   int32  `protobuf:"varint,2,opt,name=x1,proto3" json:"x1,omitempty"`
	Y1   int32  `protobuf:"varint,3,opt,name=y1,proto3" json:"y1,omitempty"`
	X2   int32  `protobuf:"varint,4,opt,name=x2,proto3" json:"x2,omitempty"`
	Y2   int32  `protobuf:"varint,5,opt,name=y2,proto3" json:"y2,omitempty"`
	// contains filtered or unexported fields
}

func (*DrawLineRequest) Descriptor deprecated

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

Deprecated: Use DrawLineRequest.ProtoReflect.Descriptor instead.

func (*DrawLineRequest) GetName

func (x *DrawLineRequest) GetName() string

func (*DrawLineRequest) GetX1

func (x *DrawLineRequest) GetX1() int32

func (*DrawLineRequest) GetX2

func (x *DrawLineRequest) GetX2() int32

func (*DrawLineRequest) GetY1

func (x *DrawLineRequest) GetY1() int32

func (*DrawLineRequest) GetY2

func (x *DrawLineRequest) GetY2() int32

func (*DrawLineRequest) ProtoMessage

func (*DrawLineRequest) ProtoMessage()

func (*DrawLineRequest) ProtoReflect

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

func (*DrawLineRequest) Reset

func (x *DrawLineRequest) Reset()

func (*DrawLineRequest) String

func (x *DrawLineRequest) String() string

type DrawLineResponse

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

func (*DrawLineResponse) Descriptor deprecated

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

Deprecated: Use DrawLineResponse.ProtoReflect.Descriptor instead.

func (*DrawLineResponse) ProtoMessage

func (*DrawLineResponse) ProtoMessage()

func (*DrawLineResponse) ProtoReflect

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

func (*DrawLineResponse) Reset

func (x *DrawLineResponse) Reset()

func (*DrawLineResponse) String

func (x *DrawLineResponse) String() string

type ResetRequest

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

func (*ResetRequest) Descriptor deprecated

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

Deprecated: Use ResetRequest.ProtoReflect.Descriptor instead.

func (*ResetRequest) GetName

func (x *ResetRequest) GetName() string

func (*ResetRequest) ProtoMessage

func (*ResetRequest) ProtoMessage()

func (*ResetRequest) ProtoReflect

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

func (*ResetRequest) Reset

func (x *ResetRequest) Reset()

func (*ResetRequest) String

func (x *ResetRequest) String() string

type ResetResponse

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

func (*ResetResponse) Descriptor deprecated

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

Deprecated: Use ResetResponse.ProtoReflect.Descriptor instead.

func (*ResetResponse) ProtoMessage

func (*ResetResponse) ProtoMessage()

func (*ResetResponse) ProtoReflect

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

func (*ResetResponse) Reset

func (x *ResetResponse) Reset()

func (*ResetResponse) String

func (x *ResetResponse) String() string

type UnimplementedDisplayServiceServer

type UnimplementedDisplayServiceServer struct {
}

UnimplementedDisplayServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDisplayServiceServer) DisplayBytes

func (UnimplementedDisplayServiceServer) DoCommand

func (UnimplementedDisplayServiceServer) DrawLine

func (UnimplementedDisplayServiceServer) Reset

func (UnimplementedDisplayServiceServer) WriteString

type UnsafeDisplayServiceServer

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

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

type WriteStringRequest

type WriteStringRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Xloc int32  `protobuf:"varint,2,opt,name=xloc,proto3" json:"xloc,omitempty"`
	Yloc int32  `protobuf:"varint,3,opt,name=yloc,proto3" json:"yloc,omitempty"`
	Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*WriteStringRequest) Descriptor deprecated

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

Deprecated: Use WriteStringRequest.ProtoReflect.Descriptor instead.

func (*WriteStringRequest) GetName

func (x *WriteStringRequest) GetName() string

func (*WriteStringRequest) GetText

func (x *WriteStringRequest) GetText() string

func (*WriteStringRequest) GetXloc

func (x *WriteStringRequest) GetXloc() int32

func (*WriteStringRequest) GetYloc

func (x *WriteStringRequest) GetYloc() int32

func (*WriteStringRequest) ProtoMessage

func (*WriteStringRequest) ProtoMessage()

func (*WriteStringRequest) ProtoReflect

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

func (*WriteStringRequest) Reset

func (x *WriteStringRequest) Reset()

func (*WriteStringRequest) String

func (x *WriteStringRequest) String() string

type WriteStringResponse

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

func (*WriteStringResponse) Descriptor deprecated

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

Deprecated: Use WriteStringResponse.ProtoReflect.Descriptor instead.

func (*WriteStringResponse) ProtoMessage

func (*WriteStringResponse) ProtoMessage()

func (*WriteStringResponse) ProtoReflect

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

func (*WriteStringResponse) Reset

func (x *WriteStringResponse) Reset()

func (*WriteStringResponse) String

func (x *WriteStringResponse) String() string

Jump to

Keyboard shortcuts

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