Documentation
¶
Index ¶
- Variables
- type Empty
- type GeoPoint
- type LogLevel
- type LogPayload
- func (*LogPayload) Descriptor() ([]byte, []int)deprecated
- func (x *LogPayload) GetLevel() LogLevel
- func (x *LogPayload) GetMessage() string
- func (x *LogPayload) GetTimestamp() uint64
- func (*LogPayload) ProtoMessage()
- func (x *LogPayload) ProtoReflect() protoreflect.Message
- func (x *LogPayload) Reset()
- func (x *LogPayload) String() string
- type Message
- func (*Message) Descriptor() ([]byte, []int)deprecated
- func (x *Message) GetEmpty() *Empty
- func (x *Message) GetLogPayload() *LogPayload
- 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_LogPayload
- 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: "Unknown", 1: "Heartbeat", 2: "Report", 3: "ReportImmediately", 4: "SetReportInterval", 5: "ReportMac", 6: "ReportLog", } MessageType_value = map[string]int32{ "Unknown": 0, "Heartbeat": 1, "Report": 2, "ReportImmediately": 3, "SetReportInterval": 4, "ReportMac": 5, "ReportLog": 6, } )
Enum value maps for MessageType.
View Source
var ( LogLevel_name = map[int32]string{ 0: "LogLevelUnknown", 1: "LogLevelDebug", 2: "LogLevelInfo", 3: "LogLevelWarning", 4: "LogLevelError", } LogLevel_value = map[string]int32{ "LogLevelUnknown": 0, "LogLevelDebug": 1, "LogLevelInfo": 2, "LogLevelWarning": 3, "LogLevelError": 4, } )
Enum value maps for LogLevel.
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 LogLevel ¶ added in v0.1.1
type LogLevel int32
func (LogLevel) Descriptor ¶ added in v0.1.1
func (LogLevel) Descriptor() protoreflect.EnumDescriptor
func (LogLevel) EnumDescriptor
deprecated
added in
v0.1.1
func (LogLevel) Number ¶ added in v0.1.1
func (x LogLevel) Number() protoreflect.EnumNumber
func (LogLevel) Type ¶ added in v0.1.1
func (LogLevel) Type() protoreflect.EnumType
type LogPayload ¶ added in v0.1.1
type LogPayload struct {
Level LogLevel `protobuf:"varint,1,opt,name=level,proto3,enum=api.collector.LogLevel" json:"level,omitempty"`
Timestamp uint64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*LogPayload) Descriptor
deprecated
added in
v0.1.1
func (*LogPayload) Descriptor() ([]byte, []int)
Deprecated: Use LogPayload.ProtoReflect.Descriptor instead.
func (*LogPayload) GetLevel ¶ added in v0.1.1
func (x *LogPayload) GetLevel() LogLevel
func (*LogPayload) GetMessage ¶ added in v0.1.1
func (x *LogPayload) GetMessage() string
func (*LogPayload) GetTimestamp ¶ added in v0.1.1
func (x *LogPayload) GetTimestamp() uint64
func (*LogPayload) ProtoMessage ¶ added in v0.1.1
func (*LogPayload) ProtoMessage()
func (*LogPayload) ProtoReflect ¶ added in v0.1.1
func (x *LogPayload) ProtoReflect() protoreflect.Message
func (*LogPayload) Reset ¶ added in v0.1.1
func (x *LogPayload) Reset()
func (*LogPayload) String ¶ added in v0.1.1
func (x *LogPayload) String() string
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
// *Message_LogPayload
Payload isMessage_Payload `protobuf_oneof:"payload"`
// contains filtered or unexported fields
}
func (*Message) Descriptor
deprecated
func (*Message) GetLogPayload ¶ added in v0.1.1
func (x *Message) GetLogPayload() *LogPayload
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_Unknown MessageType = 0 // 心跳 MessageType_Heartbeat MessageType = 1 // 上报 MessageType_Report MessageType = 2 // 要求单片机立即上报 MessageType_ReportImmediately MessageType = 3 // 设置单片机上报间隔 MessageType_SetReportInterval MessageType = 4 // 上报MAC地址 MessageType_ReportMac MessageType = 5 // 上报日志 MessageType_ReportLog MessageType = 6 )
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_LogPayload ¶ added in v0.1.1
type Message_LogPayload struct {
LogPayload *LogPayload `protobuf:"bytes,6,opt,name=log_payload,json=logPayload,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.