Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterSensorsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSensorsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SensorsServiceClient) error
- func RegisterSensorsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSensorsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SensorsServiceServer) error
- func RegisterSensorsServiceServer(s grpc.ServiceRegistrar, srv SensorsServiceServer)
- type GetReadingsRequestdeprecated
- func (*GetReadingsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetReadingsRequest) GetExtra() *structpb.Structdeprecated
- func (x *GetReadingsRequest) GetName() stringdeprecated
- func (x *GetReadingsRequest) GetSensorNames() []*v1.ResourceNamedeprecated
- func (*GetReadingsRequest) ProtoMessage()
- func (x *GetReadingsRequest) ProtoReflect() protoreflect.Message
- func (x *GetReadingsRequest) Reset()
- func (x *GetReadingsRequest) String() string
- type GetReadingsResponsedeprecated
- func (*GetReadingsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetReadingsResponse) GetReadings() []*Readingsdeprecated
- func (*GetReadingsResponse) ProtoMessage()
- func (x *GetReadingsResponse) ProtoReflect() protoreflect.Message
- func (x *GetReadingsResponse) Reset()
- func (x *GetReadingsResponse) String() string
- type GetSensorsRequestdeprecated
- func (*GetSensorsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetSensorsRequest) GetExtra() *structpb.Structdeprecated
- func (x *GetSensorsRequest) GetName() stringdeprecated
- func (*GetSensorsRequest) ProtoMessage()
- func (x *GetSensorsRequest) ProtoReflect() protoreflect.Message
- func (x *GetSensorsRequest) Reset()
- func (x *GetSensorsRequest) String() string
- type GetSensorsResponsedeprecated
- func (*GetSensorsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetSensorsResponse) GetSensorNames() []*v1.ResourceNamedeprecated
- func (*GetSensorsResponse) ProtoMessage()
- func (x *GetSensorsResponse) ProtoReflect() protoreflect.Message
- func (x *GetSensorsResponse) Reset()
- func (x *GetSensorsResponse) String() string
- type Readingsdeprecated
- func (*Readings) Descriptor() ([]byte, []int)deprecated
- func (x *Readings) GetName() *v1.ResourceNamedeprecated
- func (x *Readings) GetReadings() map[string]*structpb.Valuedeprecated
- func (*Readings) ProtoMessage()
- func (x *Readings) ProtoReflect() protoreflect.Message
- func (x *Readings) Reset()
- func (x *Readings) String() string
- type SensorsServiceClient
- type SensorsServiceServer
- type UnimplementedSensorsServiceServer
- func (UnimplementedSensorsServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error)
- func (UnimplementedSensorsServiceServer) GetReadings(context.Context, *GetReadingsRequest) (*GetReadingsResponse, error)
- func (UnimplementedSensorsServiceServer) GetSensors(context.Context, *GetSensorsRequest) (*GetSensorsResponse, error)
- type UnsafeSensorsServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_service_sensors_v1_sensors_proto protoreflect.FileDescriptor
var SensorsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "viam.service.sensors.v1.SensorsService", HandlerType: (*SensorsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetSensors", Handler: _SensorsService_GetSensors_Handler, }, { MethodName: "GetReadings", Handler: _SensorsService_GetReadings_Handler, }, { MethodName: "DoCommand", Handler: _SensorsService_DoCommand_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service/sensors/v1/sensors.proto", }
SensorsService_ServiceDesc is the grpc.ServiceDesc for SensorsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSensorsServiceHandler ¶
func RegisterSensorsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSensorsServiceHandler registers the http handlers for service SensorsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSensorsServiceHandlerClient ¶
func RegisterSensorsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SensorsServiceClient) error
RegisterSensorsServiceHandlerClient registers the http handlers for service SensorsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SensorsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SensorsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SensorsServiceClient" to call the correct interceptors.
func RegisterSensorsServiceHandlerFromEndpoint ¶
func RegisterSensorsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSensorsServiceHandlerFromEndpoint is same as RegisterSensorsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSensorsServiceHandlerServer ¶
func RegisterSensorsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SensorsServiceServer) error
RegisterSensorsServiceHandlerServer registers the http handlers for service SensorsService to "mux". UnaryRPC :call SensorsServiceServer 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 RegisterSensorsServiceHandlerFromEndpoint instead.
func RegisterSensorsServiceServer ¶
func RegisterSensorsServiceServer(s grpc.ServiceRegistrar, srv SensorsServiceServer)
Types ¶
type GetReadingsRequest
deprecated
type GetReadingsRequest struct { // Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated. SensorNames []*v1.ResourceName `protobuf:"bytes,2,rep,name=sensor_names,json=sensorNames,proto3" json:"sensor_names,omitempty"` // Additional arguments to the method // // Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated. Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` // contains filtered or unexported fields }
Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated.
func (*GetReadingsRequest) Descriptor
deprecated
func (*GetReadingsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetReadingsRequest.ProtoReflect.Descriptor instead.
func (*GetReadingsRequest) GetExtra
deprecated
added in
v0.1.6
func (x *GetReadingsRequest) GetExtra() *structpb.Struct
Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated.
func (*GetReadingsRequest) GetName
deprecated
func (x *GetReadingsRequest) GetName() string
Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated.
func (*GetReadingsRequest) GetSensorNames
deprecated
func (x *GetReadingsRequest) GetSensorNames() []*v1.ResourceName
Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated.
func (*GetReadingsRequest) ProtoMessage ¶
func (*GetReadingsRequest) ProtoMessage()
func (*GetReadingsRequest) ProtoReflect ¶
func (x *GetReadingsRequest) ProtoReflect() protoreflect.Message
func (*GetReadingsRequest) Reset ¶
func (x *GetReadingsRequest) Reset()
func (*GetReadingsRequest) String ¶
func (x *GetReadingsRequest) String() string
type GetReadingsResponse
deprecated
type GetReadingsResponse struct { // Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated. Readings []*Readings `protobuf:"bytes,1,rep,name=readings,proto3" json:"readings,omitempty"` // contains filtered or unexported fields }
Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated.
func (*GetReadingsResponse) Descriptor
deprecated
func (*GetReadingsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetReadingsResponse.ProtoReflect.Descriptor instead.
func (*GetReadingsResponse) GetReadings
deprecated
func (x *GetReadingsResponse) GetReadings() []*Readings
Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated.
func (*GetReadingsResponse) ProtoMessage ¶
func (*GetReadingsResponse) ProtoMessage()
func (*GetReadingsResponse) ProtoReflect ¶
func (x *GetReadingsResponse) ProtoReflect() protoreflect.Message
func (*GetReadingsResponse) Reset ¶
func (x *GetReadingsResponse) Reset()
func (*GetReadingsResponse) String ¶
func (x *GetReadingsResponse) String() string
type GetSensorsRequest
deprecated
type GetSensorsRequest struct { // Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Additional arguments to the method // // Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated. Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"` // contains filtered or unexported fields }
The sensors service messages are deprecated
Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated.
func (*GetSensorsRequest) Descriptor
deprecated
func (*GetSensorsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetSensorsRequest.ProtoReflect.Descriptor instead.
func (*GetSensorsRequest) GetExtra
deprecated
added in
v0.1.6
func (x *GetSensorsRequest) GetExtra() *structpb.Struct
Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated.
func (*GetSensorsRequest) GetName
deprecated
func (x *GetSensorsRequest) GetName() string
Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated.
func (*GetSensorsRequest) ProtoMessage ¶
func (*GetSensorsRequest) ProtoMessage()
func (*GetSensorsRequest) ProtoReflect ¶
func (x *GetSensorsRequest) ProtoReflect() protoreflect.Message
func (*GetSensorsRequest) Reset ¶
func (x *GetSensorsRequest) Reset()
func (*GetSensorsRequest) String ¶
func (x *GetSensorsRequest) String() string
type GetSensorsResponse
deprecated
type GetSensorsResponse struct { // Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated. SensorNames []*v1.ResourceName `protobuf:"bytes,1,rep,name=sensor_names,json=sensorNames,proto3" json:"sensor_names,omitempty"` // contains filtered or unexported fields }
Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated.
func (*GetSensorsResponse) Descriptor
deprecated
func (*GetSensorsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetSensorsResponse.ProtoReflect.Descriptor instead.
func (*GetSensorsResponse) GetSensorNames
deprecated
func (x *GetSensorsResponse) GetSensorNames() []*v1.ResourceName
Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated.
func (*GetSensorsResponse) ProtoMessage ¶
func (*GetSensorsResponse) ProtoMessage()
func (*GetSensorsResponse) ProtoReflect ¶
func (x *GetSensorsResponse) ProtoReflect() protoreflect.Message
func (*GetSensorsResponse) Reset ¶
func (x *GetSensorsResponse) Reset()
func (*GetSensorsResponse) String ¶
func (x *GetSensorsResponse) String() string
type Readings
deprecated
type Readings struct { // Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated. Name *v1.ResourceName `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated. Readings map[string]*structpb.Value `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated.
func (*Readings) Descriptor
deprecated
func (*Readings) GetName
deprecated
func (x *Readings) GetName() *v1.ResourceName
Deprecated: The entire proto file service/sensors/v1/sensors.proto is marked as deprecated.
func (*Readings) GetReadings
deprecated
func (*Readings) ProtoMessage ¶
func (*Readings) ProtoMessage()
func (*Readings) ProtoReflect ¶
func (x *Readings) ProtoReflect() protoreflect.Message
type SensorsServiceClient ¶
type SensorsServiceClient interface { // Deprecated: Do not use. // GetSensors returns the list of all sensors. GetSensors(ctx context.Context, in *GetSensorsRequest, opts ...grpc.CallOption) (*GetSensorsResponse, error) // Deprecated: Do not use. // GetReadings returns the list of readings for all sensors specified. GetReadings(ctx context.Context, in *GetReadingsRequest, opts ...grpc.CallOption) (*GetReadingsResponse, error) // Deprecated: Do not use. // DoCommand sends/receives arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) }
SensorsServiceClient is the client API for SensorsService 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.
func NewSensorsServiceClient ¶
func NewSensorsServiceClient(cc grpc.ClientConnInterface) SensorsServiceClient
type SensorsServiceServer ¶
type SensorsServiceServer interface { // Deprecated: Do not use. // GetSensors returns the list of all sensors. GetSensors(context.Context, *GetSensorsRequest) (*GetSensorsResponse, error) // Deprecated: Do not use. // GetReadings returns the list of readings for all sensors specified. GetReadings(context.Context, *GetReadingsRequest) (*GetReadingsResponse, error) // Deprecated: Do not use. // DoCommand sends/receives arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) // contains filtered or unexported methods }
SensorsServiceServer is the server API for SensorsService service. All implementations must embed UnimplementedSensorsServiceServer for forward compatibility
type UnimplementedSensorsServiceServer ¶
type UnimplementedSensorsServiceServer struct { }
UnimplementedSensorsServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSensorsServiceServer) DoCommand ¶ added in v0.1.80
func (UnimplementedSensorsServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error)
func (UnimplementedSensorsServiceServer) GetReadings ¶
func (UnimplementedSensorsServiceServer) GetReadings(context.Context, *GetReadingsRequest) (*GetReadingsResponse, error)
func (UnimplementedSensorsServiceServer) GetSensors ¶
func (UnimplementedSensorsServiceServer) GetSensors(context.Context, *GetSensorsRequest) (*GetSensorsResponse, error)
type UnsafeSensorsServiceServer ¶
type UnsafeSensorsServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSensorsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SensorsServiceServer will result in compilation errors.