Documentation ¶
Index ¶
- Variables
- func RegisterEquipServiceServer(s grpc.ServiceRegistrar, srv EquipServiceServer)
- func RegisterMetricServiceServer(s grpc.ServiceRegistrar, srv MetricServiceServer)
- func RegisterPointServiceServer(s grpc.ServiceRegistrar, srv PointServiceServer)
- type DeleteResponse
- type Empty
- type Equip
- type EquipId
- type EquipList
- type EquipServiceClient
- type EquipServiceServer
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetLimit() uint32
- func (x *ListRequest) GetOffset() uint32
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- type Metric
- func (*Metric) Descriptor() ([]byte, []int)deprecated
- func (x *Metric) GetPointId() int64
- func (x *Metric) GetTimestamp() *timestamppb.Timestamp
- func (x *Metric) GetValue() float64
- func (*Metric) ProtoMessage()
- func (x *Metric) ProtoReflect() protoreflect.Message
- func (x *Metric) Reset()
- func (x *Metric) String() string
- type MetricList
- type MetricRequest
- func (*MetricRequest) Descriptor() ([]byte, []int)deprecated
- func (x *MetricRequest) GetFrom() *timestamppb.Timestamp
- func (x *MetricRequest) GetPointId() int64
- func (x *MetricRequest) GetTo() *timestamppb.Timestamp
- func (*MetricRequest) ProtoMessage()
- func (x *MetricRequest) ProtoReflect() protoreflect.Message
- func (x *MetricRequest) Reset()
- func (x *MetricRequest) String() string
- type MetricServiceClient
- type MetricServiceServer
- type MetricWriteResponse
- func (*MetricWriteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *MetricWriteResponse) GetAccepted() bool
- func (*MetricWriteResponse) ProtoMessage()
- func (x *MetricWriteResponse) ProtoReflect() protoreflect.Message
- func (x *MetricWriteResponse) Reset()
- func (x *MetricWriteResponse) String() string
- type Point
- type PointId
- type PointList
- type PointServiceClient
- type PointServiceServer
- type UnimplementedEquipServiceServer
- func (UnimplementedEquipServiceServer) Create(context.Context, *Equip) (*Equip, error)
- func (UnimplementedEquipServiceServer) Delete(context.Context, *EquipId) (*DeleteResponse, error)
- func (UnimplementedEquipServiceServer) Get(context.Context, *EquipId) (*Equip, error)
- func (UnimplementedEquipServiceServer) GetAll(context.Context, *ListRequest) (*EquipList, error)
- func (UnimplementedEquipServiceServer) GetOrCreate(context.Context, *Equip) (*Equip, error)
- func (UnimplementedEquipServiceServer) Update(context.Context, *Equip) (*Equip, error)
- type UnimplementedMetricServiceServer
- type UnimplementedPointServiceServer
- func (UnimplementedPointServiceServer) Create(context.Context, *Point) (*Point, error)
- func (UnimplementedPointServiceServer) Delete(context.Context, *PointId) (*DeleteResponse, error)
- func (UnimplementedPointServiceServer) Get(context.Context, *PointId) (*Point, error)
- func (UnimplementedPointServiceServer) GetAll(context.Context, *ListRequest) (*PointList, error)
- func (UnimplementedPointServiceServer) GetAllByEquip(context.Context, *EquipId) (*PointList, error)
- func (UnimplementedPointServiceServer) GetOrCreate(context.Context, *Point) (*Point, error)
- func (UnimplementedPointServiceServer) Update(context.Context, *Point) (*Point, error)
- type UnsafeEquipServiceServer
- type UnsafeMetricServiceServer
- type UnsafePointServiceServer
Constants ¶
This section is empty.
Variables ¶
var EquipService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.EquipService", HandlerType: (*EquipServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _EquipService_Get_Handler, }, { MethodName: "GetAll", Handler: _EquipService_GetAll_Handler, }, { MethodName: "Create", Handler: _EquipService_Create_Handler, }, { MethodName: "Update", Handler: _EquipService_Update_Handler, }, { MethodName: "Delete", Handler: _EquipService_Delete_Handler, }, { MethodName: "GetOrCreate", Handler: _EquipService_GetOrCreate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "equip_service.proto", }
EquipService_ServiceDesc is the grpc.ServiceDesc for EquipService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_common_proto protoreflect.FileDescriptor
var File_equip_proto protoreflect.FileDescriptor
var File_equip_service_proto protoreflect.FileDescriptor
var File_metric_proto protoreflect.FileDescriptor
var File_metric_service_proto protoreflect.FileDescriptor
var File_point_proto protoreflect.FileDescriptor
var File_point_service_proto protoreflect.FileDescriptor
var MetricService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.MetricService", HandlerType: (*MetricServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Write", Handler: _MetricService_Write_Handler, }, { MethodName: "WriteList", Handler: _MetricService_WriteList_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "metric_service.proto", }
MetricService_ServiceDesc is the grpc.ServiceDesc for MetricService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var PointService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.PointService", HandlerType: (*PointServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _PointService_Get_Handler, }, { MethodName: "GetAll", Handler: _PointService_GetAll_Handler, }, { MethodName: "Create", Handler: _PointService_Create_Handler, }, { MethodName: "Update", Handler: _PointService_Update_Handler, }, { MethodName: "Delete", Handler: _PointService_Delete_Handler, }, { MethodName: "GetOrCreate", Handler: _PointService_GetOrCreate_Handler, }, { MethodName: "GetAllByEquip", Handler: _PointService_GetAllByEquip_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "point_service.proto", }
PointService_ServiceDesc is the grpc.ServiceDesc for PointService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterEquipServiceServer ¶
func RegisterEquipServiceServer(s grpc.ServiceRegistrar, srv EquipServiceServer)
func RegisterMetricServiceServer ¶ added in v0.1.5
func RegisterMetricServiceServer(s grpc.ServiceRegistrar, srv MetricServiceServer)
func RegisterPointServiceServer ¶
func RegisterPointServiceServer(s grpc.ServiceRegistrar, srv PointServiceServer)
Types ¶
type DeleteResponse ¶
type DeleteResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) GetSuccess ¶
func (x *DeleteResponse) GetSuccess() bool
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (x *DeleteResponse) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type Equip ¶
type Equip struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Equip) Descriptor
deprecated
func (*Equip) ProtoMessage ¶
func (*Equip) ProtoMessage()
func (*Equip) ProtoReflect ¶
func (x *Equip) ProtoReflect() protoreflect.Message
type EquipId ¶ added in v0.1.3
type EquipId struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*EquipId) Descriptor
deprecated
added in
v0.1.3
func (*EquipId) ProtoMessage ¶ added in v0.1.3
func (*EquipId) ProtoMessage()
func (*EquipId) ProtoReflect ¶ added in v0.1.3
func (x *EquipId) ProtoReflect() protoreflect.Message
type EquipList ¶
type EquipList struct { Equips []*Equip `protobuf:"bytes,1,rep,name=Equips,proto3" json:"Equips,omitempty"` // contains filtered or unexported fields }
func (*EquipList) Descriptor
deprecated
func (*EquipList) ProtoMessage ¶
func (*EquipList) ProtoMessage()
func (*EquipList) ProtoReflect ¶
func (x *EquipList) ProtoReflect() protoreflect.Message
type EquipServiceClient ¶
type EquipServiceClient interface { Get(ctx context.Context, in *EquipId, opts ...grpc.CallOption) (*Equip, error) GetAll(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*EquipList, error) Create(ctx context.Context, in *Equip, opts ...grpc.CallOption) (*Equip, error) Update(ctx context.Context, in *Equip, opts ...grpc.CallOption) (*Equip, error) Delete(ctx context.Context, in *EquipId, opts ...grpc.CallOption) (*DeleteResponse, error) GetOrCreate(ctx context.Context, in *Equip, opts ...grpc.CallOption) (*Equip, error) }
EquipServiceClient is the client API for EquipService 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 NewEquipServiceClient ¶
func NewEquipServiceClient(cc grpc.ClientConnInterface) EquipServiceClient
type EquipServiceServer ¶
type EquipServiceServer interface { Get(context.Context, *EquipId) (*Equip, error) GetAll(context.Context, *ListRequest) (*EquipList, error) Create(context.Context, *Equip) (*Equip, error) Update(context.Context, *Equip) (*Equip, error) Delete(context.Context, *EquipId) (*DeleteResponse, error) GetOrCreate(context.Context, *Equip) (*Equip, error) // contains filtered or unexported methods }
EquipServiceServer is the server API for EquipService service. All implementations must embed UnimplementedEquipServiceServer for forward compatibility
type ListRequest ¶
type ListRequest struct { Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetLimit ¶
func (x *ListRequest) GetLimit() uint32
func (*ListRequest) GetOffset ¶
func (x *ListRequest) GetOffset() uint32
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type Metric ¶ added in v0.1.5
type Metric struct { PointId int64 `protobuf:"varint,1,opt,name=pointId,proto3" json:"pointId,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Value float64 `protobuf:"fixed64,3,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*Metric) Descriptor
deprecated
added in
v0.1.5
func (*Metric) GetPointId ¶ added in v0.1.5
func (*Metric) GetTimestamp ¶ added in v0.1.5
func (x *Metric) GetTimestamp() *timestamppb.Timestamp
func (*Metric) ProtoMessage ¶ added in v0.1.5
func (*Metric) ProtoMessage()
func (*Metric) ProtoReflect ¶ added in v0.1.5
func (x *Metric) ProtoReflect() protoreflect.Message
type MetricList ¶ added in v0.1.5
type MetricList struct { Metrics []*Metric `protobuf:"bytes,1,rep,name=Metrics,proto3" json:"Metrics,omitempty"` // contains filtered or unexported fields }
func (*MetricList) Descriptor
deprecated
added in
v0.1.5
func (*MetricList) Descriptor() ([]byte, []int)
Deprecated: Use MetricList.ProtoReflect.Descriptor instead.
func (*MetricList) GetMetrics ¶ added in v0.1.5
func (x *MetricList) GetMetrics() []*Metric
func (*MetricList) ProtoMessage ¶ added in v0.1.5
func (*MetricList) ProtoMessage()
func (*MetricList) ProtoReflect ¶ added in v0.1.5
func (x *MetricList) ProtoReflect() protoreflect.Message
func (*MetricList) Reset ¶ added in v0.1.5
func (x *MetricList) Reset()
func (*MetricList) String ¶ added in v0.1.5
func (x *MetricList) String() string
type MetricRequest ¶ added in v0.1.5
type MetricRequest struct { PointId int64 `protobuf:"varint,1,opt,name=pointId,proto3" json:"pointId,omitempty"` From *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"` To *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=to,proto3" json:"to,omitempty"` // contains filtered or unexported fields }
func (*MetricRequest) Descriptor
deprecated
added in
v0.1.5
func (*MetricRequest) Descriptor() ([]byte, []int)
Deprecated: Use MetricRequest.ProtoReflect.Descriptor instead.
func (*MetricRequest) GetFrom ¶ added in v0.1.5
func (x *MetricRequest) GetFrom() *timestamppb.Timestamp
func (*MetricRequest) GetPointId ¶ added in v0.1.5
func (x *MetricRequest) GetPointId() int64
func (*MetricRequest) GetTo ¶ added in v0.1.5
func (x *MetricRequest) GetTo() *timestamppb.Timestamp
func (*MetricRequest) ProtoMessage ¶ added in v0.1.5
func (*MetricRequest) ProtoMessage()
func (*MetricRequest) ProtoReflect ¶ added in v0.1.5
func (x *MetricRequest) ProtoReflect() protoreflect.Message
func (*MetricRequest) Reset ¶ added in v0.1.5
func (x *MetricRequest) Reset()
func (*MetricRequest) String ¶ added in v0.1.5
func (x *MetricRequest) String() string
type MetricServiceClient ¶ added in v0.1.5
type MetricServiceClient interface { Write(ctx context.Context, in *Metric, opts ...grpc.CallOption) (*MetricWriteResponse, error) WriteList(ctx context.Context, in *MetricList, opts ...grpc.CallOption) (*MetricWriteResponse, error) }
MetricServiceClient is the client API for MetricService 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 NewMetricServiceClient ¶ added in v0.1.5
func NewMetricServiceClient(cc grpc.ClientConnInterface) MetricServiceClient
type MetricServiceServer ¶ added in v0.1.5
type MetricServiceServer interface { Write(context.Context, *Metric) (*MetricWriteResponse, error) WriteList(context.Context, *MetricList) (*MetricWriteResponse, error) // contains filtered or unexported methods }
MetricServiceServer is the server API for MetricService service. All implementations must embed UnimplementedMetricServiceServer for forward compatibility
type MetricWriteResponse ¶ added in v0.1.5
type MetricWriteResponse struct { Accepted bool `protobuf:"varint,1,opt,name=accepted,proto3" json:"accepted,omitempty"` // contains filtered or unexported fields }
func (*MetricWriteResponse) Descriptor
deprecated
added in
v0.1.5
func (*MetricWriteResponse) Descriptor() ([]byte, []int)
Deprecated: Use MetricWriteResponse.ProtoReflect.Descriptor instead.
func (*MetricWriteResponse) GetAccepted ¶ added in v0.1.5
func (x *MetricWriteResponse) GetAccepted() bool
func (*MetricWriteResponse) ProtoMessage ¶ added in v0.1.5
func (*MetricWriteResponse) ProtoMessage()
func (*MetricWriteResponse) ProtoReflect ¶ added in v0.1.5
func (x *MetricWriteResponse) ProtoReflect() protoreflect.Message
func (*MetricWriteResponse) Reset ¶ added in v0.1.5
func (x *MetricWriteResponse) Reset()
func (*MetricWriteResponse) String ¶ added in v0.1.5
func (x *MetricWriteResponse) String() string
type Point ¶
type Point struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` EquipId int64 `protobuf:"varint,2,opt,name=equipId,proto3" json:"equipId,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Point) Descriptor
deprecated
func (*Point) GetEquipId ¶ added in v0.1.3
func (*Point) ProtoMessage ¶
func (*Point) ProtoMessage()
func (*Point) ProtoReflect ¶
func (x *Point) ProtoReflect() protoreflect.Message
type PointId ¶ added in v0.1.3
type PointId struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*PointId) Descriptor
deprecated
added in
v0.1.3
func (*PointId) ProtoMessage ¶ added in v0.1.3
func (*PointId) ProtoMessage()
func (*PointId) ProtoReflect ¶ added in v0.1.3
func (x *PointId) ProtoReflect() protoreflect.Message
type PointList ¶
type PointList struct { Points []*Point `protobuf:"bytes,1,rep,name=Points,proto3" json:"Points,omitempty"` // contains filtered or unexported fields }
func (*PointList) Descriptor
deprecated
func (*PointList) ProtoMessage ¶
func (*PointList) ProtoMessage()
func (*PointList) ProtoReflect ¶
func (x *PointList) ProtoReflect() protoreflect.Message
type PointServiceClient ¶
type PointServiceClient interface { Get(ctx context.Context, in *PointId, opts ...grpc.CallOption) (*Point, error) GetAll(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*PointList, error) Create(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Point, error) Update(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Point, error) Delete(ctx context.Context, in *PointId, opts ...grpc.CallOption) (*DeleteResponse, error) GetOrCreate(ctx context.Context, in *Point, opts ...grpc.CallOption) (*Point, error) GetAllByEquip(ctx context.Context, in *EquipId, opts ...grpc.CallOption) (*PointList, error) }
PointServiceClient is the client API for PointService 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 NewPointServiceClient ¶
func NewPointServiceClient(cc grpc.ClientConnInterface) PointServiceClient
type PointServiceServer ¶
type PointServiceServer interface { Get(context.Context, *PointId) (*Point, error) GetAll(context.Context, *ListRequest) (*PointList, error) Create(context.Context, *Point) (*Point, error) Update(context.Context, *Point) (*Point, error) Delete(context.Context, *PointId) (*DeleteResponse, error) GetOrCreate(context.Context, *Point) (*Point, error) GetAllByEquip(context.Context, *EquipId) (*PointList, error) // contains filtered or unexported methods }
PointServiceServer is the server API for PointService service. All implementations must embed UnimplementedPointServiceServer for forward compatibility
type UnimplementedEquipServiceServer ¶
type UnimplementedEquipServiceServer struct { }
UnimplementedEquipServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedEquipServiceServer) Delete ¶
func (UnimplementedEquipServiceServer) Delete(context.Context, *EquipId) (*DeleteResponse, error)
func (UnimplementedEquipServiceServer) GetAll ¶
func (UnimplementedEquipServiceServer) GetAll(context.Context, *ListRequest) (*EquipList, error)
func (UnimplementedEquipServiceServer) GetOrCreate ¶ added in v0.1.2
type UnimplementedMetricServiceServer ¶ added in v0.1.5
type UnimplementedMetricServiceServer struct { }
UnimplementedMetricServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedMetricServiceServer) Write ¶ added in v0.1.5
func (UnimplementedMetricServiceServer) Write(context.Context, *Metric) (*MetricWriteResponse, error)
func (UnimplementedMetricServiceServer) WriteList ¶ added in v0.1.9
func (UnimplementedMetricServiceServer) WriteList(context.Context, *MetricList) (*MetricWriteResponse, error)
type UnimplementedPointServiceServer ¶
type UnimplementedPointServiceServer struct { }
UnimplementedPointServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedPointServiceServer) Delete ¶
func (UnimplementedPointServiceServer) Delete(context.Context, *PointId) (*DeleteResponse, error)
func (UnimplementedPointServiceServer) GetAll ¶
func (UnimplementedPointServiceServer) GetAll(context.Context, *ListRequest) (*PointList, error)
func (UnimplementedPointServiceServer) GetAllByEquip ¶ added in v0.1.3
func (UnimplementedPointServiceServer) GetOrCreate ¶ added in v0.1.2
type UnsafeEquipServiceServer ¶
type UnsafeEquipServiceServer interface {
// contains filtered or unexported methods
}
UnsafeEquipServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to EquipServiceServer will result in compilation errors.
type UnsafeMetricServiceServer ¶ added in v0.1.5
type UnsafeMetricServiceServer interface {
// contains filtered or unexported methods
}
UnsafeMetricServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MetricServiceServer will result in compilation errors.
type UnsafePointServiceServer ¶
type UnsafePointServiceServer interface {
// contains filtered or unexported methods
}
UnsafePointServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PointServiceServer will result in compilation errors.