Documentation
¶
Index ¶
- Variables
- type Empty
- type GeoPoint
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetEmpty() *Empty
- func (x *Message) GetMac() string
- func (m *Message) GetPayload() isMessage_Payload
- func (x *Message) GetReportPayload() *ReportPayload
- func (x *Message) GetSetReportIntervalPayload() *SetReportIntervalPayload
- func (x *Message) GetType() MessageType
- func (*Message) ProtoMessage()
- func (x *Message) ProtoReflect() protoreflect.Message
- func (x *Message) Reset()
- func (x *Message) String() string
- type MessageType
- func (MessageType) Descriptor() protoreflect.EnumDescriptor
- func (x MessageType) Enum() *MessageType
- func (MessageType) EnumDescriptor() ([]byte, []int)deprecated
- func (x MessageType) Number() protoreflect.EnumNumber
- func (x MessageType) String() string
- func (MessageType) Type() protoreflect.EnumType
- type Message_Empty
- type Message_Mac
- type Message_ReportPayload
- type Message_SetReportIntervalPayload
- type ReportPayload
- func (*ReportPayload) Descriptor() ([]byte, []int)deprecated
- func (x *ReportPayload) GetGeoPoint() *GeoPoint
- func (x *ReportPayload) GetTemperature() float64
- func (x *ReportPayload) GetTimestamp() uint64
- func (*ReportPayload) ProtoMessage()
- func (x *ReportPayload) ProtoReflect() protoreflect.Message
- func (x *ReportPayload) Reset()
- func (x *ReportPayload) String() string
- type SetReportIntervalPayload
- func (*SetReportIntervalPayload) Descriptor() ([]byte, []int)deprecated
- func (x *SetReportIntervalPayload) GetInterval() uint64
- func (*SetReportIntervalPayload) ProtoMessage()
- func (x *SetReportIntervalPayload) ProtoReflect() protoreflect.Message
- func (x *SetReportIntervalPayload) Reset()
- func (x *SetReportIntervalPayload) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MessageType_name = map[int32]string{ 0: "Heartbeat", 1: "Report", 2: "ReportImmediately", 3: "SetReportInterval", 4: "ReportMac", } MessageType_value = map[string]int32{ "Heartbeat": 0, "Report": 1, "ReportImmediately": 2, "SetReportInterval": 3, "ReportMac": 4, } )
Enum value maps for MessageType.
View Source
var File_proto_collector_collector_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
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 GeoPoint ¶
type GeoPoint struct {
Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"`
Longitude float64 `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"`
// contains filtered or unexported fields
}
func (*GeoPoint) Descriptor
deprecated
func (*GeoPoint) GetLatitude ¶
func (*GeoPoint) GetLongitude ¶
func (*GeoPoint) ProtoMessage ¶
func (*GeoPoint) ProtoMessage()
func (*GeoPoint) ProtoReflect ¶
func (x *GeoPoint) ProtoReflect() protoreflect.Message
type Message ¶
type Message struct {
Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=api.collector.MessageType" json:"type,omitempty"`
// Types that are assignable to Payload:
//
// *Message_Empty
// *Message_ReportPayload
// *Message_SetReportIntervalPayload
// *Message_Mac
Payload isMessage_Payload `protobuf_oneof:"payload"`
// contains filtered or unexported fields
}
func (*Message) Descriptor
deprecated
func (*Message) GetPayload ¶
func (m *Message) GetPayload() isMessage_Payload
func (*Message) GetReportPayload ¶
func (x *Message) GetReportPayload() *ReportPayload
func (*Message) GetSetReportIntervalPayload ¶
func (x *Message) GetSetReportIntervalPayload() *SetReportIntervalPayload
func (*Message) GetType ¶
func (x *Message) GetType() MessageType
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) ProtoReflect ¶
func (x *Message) ProtoReflect() protoreflect.Message
type MessageType ¶
type MessageType int32
const ( // 心跳 MessageType_Heartbeat MessageType = 0 // 上报 MessageType_Report MessageType = 1 // 要求单片机立即上报 MessageType_ReportImmediately MessageType = 2 // 设置单片机上报间隔 MessageType_SetReportInterval MessageType = 3 // 上报MAC地址 MessageType_ReportMac MessageType = 4 )
func (MessageType) Descriptor ¶
func (MessageType) Descriptor() protoreflect.EnumDescriptor
func (MessageType) Enum ¶
func (x MessageType) Enum() *MessageType
func (MessageType) EnumDescriptor
deprecated
func (MessageType) EnumDescriptor() ([]byte, []int)
Deprecated: Use MessageType.Descriptor instead.
func (MessageType) Number ¶
func (x MessageType) Number() protoreflect.EnumNumber
func (MessageType) String ¶
func (x MessageType) String() string
func (MessageType) Type ¶
func (MessageType) Type() protoreflect.EnumType
type Message_Empty ¶
type Message_Empty struct {
Empty *Empty `protobuf:"bytes,2,opt,name=empty,proto3,oneof"`
}
type Message_Mac ¶
type Message_Mac struct {
Mac string `protobuf:"bytes,5,opt,name=mac,proto3,oneof"`
}
type Message_ReportPayload ¶
type Message_ReportPayload struct {
ReportPayload *ReportPayload `protobuf:"bytes,3,opt,name=report_payload,json=reportPayload,proto3,oneof"`
}
type Message_SetReportIntervalPayload ¶
type Message_SetReportIntervalPayload struct {
SetReportIntervalPayload *SetReportIntervalPayload `protobuf:"bytes,4,opt,name=set_report_interval_payload,json=setReportIntervalPayload,proto3,oneof"`
}
type ReportPayload ¶
type ReportPayload struct {
Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
GeoPoint *GeoPoint `protobuf:"bytes,2,opt,name=geo_point,json=geoPoint,proto3" json:"geo_point,omitempty"`
Temperature float64 `protobuf:"fixed64,3,opt,name=temperature,proto3" json:"temperature,omitempty"`
// contains filtered or unexported fields
}
func (*ReportPayload) Descriptor
deprecated
func (*ReportPayload) Descriptor() ([]byte, []int)
Deprecated: Use ReportPayload.ProtoReflect.Descriptor instead.
func (*ReportPayload) GetGeoPoint ¶
func (x *ReportPayload) GetGeoPoint() *GeoPoint
func (*ReportPayload) GetTemperature ¶
func (x *ReportPayload) GetTemperature() float64
func (*ReportPayload) GetTimestamp ¶
func (x *ReportPayload) GetTimestamp() uint64
func (*ReportPayload) ProtoMessage ¶
func (*ReportPayload) ProtoMessage()
func (*ReportPayload) ProtoReflect ¶
func (x *ReportPayload) ProtoReflect() protoreflect.Message
func (*ReportPayload) Reset ¶
func (x *ReportPayload) Reset()
func (*ReportPayload) String ¶
func (x *ReportPayload) String() string
type SetReportIntervalPayload ¶
type SetReportIntervalPayload struct {
Interval uint64 `protobuf:"varint,1,opt,name=interval,proto3" json:"interval,omitempty"`
// contains filtered or unexported fields
}
func (*SetReportIntervalPayload) Descriptor
deprecated
func (*SetReportIntervalPayload) Descriptor() ([]byte, []int)
Deprecated: Use SetReportIntervalPayload.ProtoReflect.Descriptor instead.
func (*SetReportIntervalPayload) GetInterval ¶
func (x *SetReportIntervalPayload) GetInterval() uint64
func (*SetReportIntervalPayload) ProtoMessage ¶
func (*SetReportIntervalPayload) ProtoMessage()
func (*SetReportIntervalPayload) ProtoReflect ¶
func (x *SetReportIntervalPayload) ProtoReflect() protoreflect.Message
func (*SetReportIntervalPayload) Reset ¶
func (x *SetReportIntervalPayload) Reset()
func (*SetReportIntervalPayload) String ¶
func (x *SetReportIntervalPayload) String() string
Click to show internal directories.
Click to hide internal directories.