Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterMeasurementServiceServer(s grpc.ServiceRegistrar, srv MeasurementServiceServer)
- type GetDevicesResponse
- func (*GetDevicesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetDevicesResponse) GetDeviceId() []string
- func (*GetDevicesResponse) ProtoMessage()
- func (x *GetDevicesResponse) ProtoReflect() protoreflect.Message
- func (x *GetDevicesResponse) Reset()
- func (x *GetDevicesResponse) String() string
- type GetLatestRequest
- type Measurement
- func (*Measurement) Descriptor() ([]byte, []int)deprecated
- func (x *Measurement) GetDeviceId() string
- func (x *Measurement) GetPm10() *wrapperspb.FloatValue
- func (x *Measurement) GetPm25() *wrapperspb.FloatValue
- func (x *Measurement) GetRh() *wrapperspb.FloatValue
- func (x *Measurement) GetTemp() *wrapperspb.FloatValue
- func (x *Measurement) GetTimestamp() *timestamppb.Timestamp
- func (x *Measurement) GetUploadTimestamp() *timestamppb.Timestamp
- func (*Measurement) ProtoMessage()
- func (x *Measurement) ProtoReflect() protoreflect.Message
- func (x *Measurement) Reset()
- func (x *Measurement) String() string
- type MeasurementOptions
- func (*MeasurementOptions) Descriptor() ([]byte, []int)deprecated
- func (x *MeasurementOptions) GetMetric() string
- func (x *MeasurementOptions) GetUnit() string
- func (*MeasurementOptions) ProtoMessage()
- func (x *MeasurementOptions) ProtoReflect() protoreflect.Message
- func (x *MeasurementOptions) Reset()
- func (x *MeasurementOptions) String() string
- type MeasurementServiceClient
- type MeasurementServiceServer
- type UnimplementedMeasurementServiceServer
- type UnsafeMeasurementServiceServer
Constants ¶
const ( MeasurementService_GetDevices_FullMethodName = "/measurement.MeasurementService/GetDevices" MeasurementService_GetLatest_FullMethodName = "/measurement.MeasurementService/GetLatest" )
Variables ¶
var ( // optional string regex = 50000; E_Regex = &file_measurement_proto_extTypes[0] // optional measurement.MeasurementOptions measurement_options = 50001; E_MeasurementOptions = &file_measurement_proto_extTypes[1] )
Extension fields to descriptorpb.FieldOptions.
var File_measurement_proto protoreflect.FileDescriptor
var MeasurementService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "measurement.MeasurementService", HandlerType: (*MeasurementServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetDevices", Handler: _MeasurementService_GetDevices_Handler, }, { MethodName: "GetLatest", Handler: _MeasurementService_GetLatest_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "measurement.proto", }
MeasurementService_ServiceDesc is the grpc.ServiceDesc for MeasurementService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterMeasurementServiceServer ¶
func RegisterMeasurementServiceServer(s grpc.ServiceRegistrar, srv MeasurementServiceServer)
Types ¶
type GetDevicesResponse ¶
type GetDevicesResponse struct { DeviceId []string `protobuf:"bytes,1,rep,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` // contains filtered or unexported fields }
func (*GetDevicesResponse) Descriptor
deprecated
func (*GetDevicesResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetDevicesResponse.ProtoReflect.Descriptor instead.
func (*GetDevicesResponse) GetDeviceId ¶
func (x *GetDevicesResponse) GetDeviceId() []string
func (*GetDevicesResponse) ProtoMessage ¶
func (*GetDevicesResponse) ProtoMessage()
func (*GetDevicesResponse) ProtoReflect ¶
func (x *GetDevicesResponse) ProtoReflect() protoreflect.Message
func (*GetDevicesResponse) Reset ¶
func (x *GetDevicesResponse) Reset()
func (*GetDevicesResponse) String ¶
func (x *GetDevicesResponse) String() string
type GetLatestRequest ¶
type GetLatestRequest struct { DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` // contains filtered or unexported fields }
func (*GetLatestRequest) Descriptor
deprecated
func (*GetLatestRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetLatestRequest.ProtoReflect.Descriptor instead.
func (*GetLatestRequest) GetDeviceId ¶
func (x *GetLatestRequest) GetDeviceId() string
func (*GetLatestRequest) ProtoMessage ¶
func (*GetLatestRequest) ProtoMessage()
func (*GetLatestRequest) ProtoReflect ¶
func (x *GetLatestRequest) ProtoReflect() protoreflect.Message
func (*GetLatestRequest) Reset ¶
func (x *GetLatestRequest) Reset()
func (*GetLatestRequest) String ¶
func (x *GetLatestRequest) String() string
type Measurement ¶
type Measurement struct { DeviceId string `protobuf:"bytes,1,opt,name=device_id,json=deviceId,proto3" json:"device_id,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Temp *wrapperspb.FloatValue `protobuf:"bytes,3,opt,name=temp,proto3" json:"temp,omitempty"` Pm25 *wrapperspb.FloatValue `protobuf:"bytes,5,opt,name=pm25,proto3" json:"pm25,omitempty"` Pm10 *wrapperspb.FloatValue `protobuf:"bytes,6,opt,name=pm10,proto3" json:"pm10,omitempty"` Rh *wrapperspb.FloatValue `protobuf:"bytes,7,opt,name=rh,proto3" json:"rh,omitempty"` // This field should only be set when the measurement is not uploaded // immediately after it is taken, e.g. if the network goes down and // measurements are stored locally before upload is attempted again later. UploadTimestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=upload_timestamp,json=uploadTimestamp,proto3" json:"upload_timestamp,omitempty"` // contains filtered or unexported fields }
func (*Measurement) Descriptor
deprecated
func (*Measurement) Descriptor() ([]byte, []int)
Deprecated: Use Measurement.ProtoReflect.Descriptor instead.
func (*Measurement) GetDeviceId ¶
func (x *Measurement) GetDeviceId() string
func (*Measurement) GetPm10 ¶
func (x *Measurement) GetPm10() *wrapperspb.FloatValue
func (*Measurement) GetPm25 ¶
func (x *Measurement) GetPm25() *wrapperspb.FloatValue
func (*Measurement) GetRh ¶
func (x *Measurement) GetRh() *wrapperspb.FloatValue
func (*Measurement) GetTemp ¶
func (x *Measurement) GetTemp() *wrapperspb.FloatValue
func (*Measurement) GetTimestamp ¶
func (x *Measurement) GetTimestamp() *timestamppb.Timestamp
func (*Measurement) GetUploadTimestamp ¶
func (x *Measurement) GetUploadTimestamp() *timestamppb.Timestamp
func (*Measurement) ProtoMessage ¶
func (*Measurement) ProtoMessage()
func (*Measurement) ProtoReflect ¶
func (x *Measurement) ProtoReflect() protoreflect.Message
func (*Measurement) Reset ¶
func (x *Measurement) Reset()
func (*Measurement) String ¶
func (x *Measurement) String() string
type MeasurementOptions ¶
type MeasurementOptions struct { Metric string `protobuf:"bytes,1,opt,name=metric,proto3" json:"metric,omitempty"` Unit string `protobuf:"bytes,2,opt,name=unit,proto3" json:"unit,omitempty"` // contains filtered or unexported fields }
func (*MeasurementOptions) Descriptor
deprecated
func (*MeasurementOptions) Descriptor() ([]byte, []int)
Deprecated: Use MeasurementOptions.ProtoReflect.Descriptor instead.
func (*MeasurementOptions) GetMetric ¶
func (x *MeasurementOptions) GetMetric() string
func (*MeasurementOptions) GetUnit ¶
func (x *MeasurementOptions) GetUnit() string
func (*MeasurementOptions) ProtoMessage ¶
func (*MeasurementOptions) ProtoMessage()
func (*MeasurementOptions) ProtoReflect ¶
func (x *MeasurementOptions) ProtoReflect() protoreflect.Message
func (*MeasurementOptions) Reset ¶
func (x *MeasurementOptions) Reset()
func (*MeasurementOptions) String ¶
func (x *MeasurementOptions) String() string
type MeasurementServiceClient ¶
type MeasurementServiceClient interface { GetDevices(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetDevicesResponse, error) GetLatest(ctx context.Context, in *GetLatestRequest, opts ...grpc.CallOption) (*Measurement, error) }
MeasurementServiceClient is the client API for MeasurementService 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 NewMeasurementServiceClient ¶
func NewMeasurementServiceClient(cc grpc.ClientConnInterface) MeasurementServiceClient
type MeasurementServiceServer ¶
type MeasurementServiceServer interface { GetDevices(context.Context, *emptypb.Empty) (*GetDevicesResponse, error) GetLatest(context.Context, *GetLatestRequest) (*Measurement, error) // contains filtered or unexported methods }
MeasurementServiceServer is the server API for MeasurementService service. All implementations must embed UnimplementedMeasurementServiceServer for forward compatibility
type UnimplementedMeasurementServiceServer ¶
type UnimplementedMeasurementServiceServer struct { }
UnimplementedMeasurementServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedMeasurementServiceServer) GetDevices ¶
func (UnimplementedMeasurementServiceServer) GetDevices(context.Context, *emptypb.Empty) (*GetDevicesResponse, error)
func (UnimplementedMeasurementServiceServer) GetLatest ¶
func (UnimplementedMeasurementServiceServer) GetLatest(context.Context, *GetLatestRequest) (*Measurement, error)
type UnsafeMeasurementServiceServer ¶
type UnsafeMeasurementServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMeasurementServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MeasurementServiceServer will result in compilation errors.