collector

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use GeoPoint.ProtoReflect.Descriptor instead.

func (*GeoPoint) GetLatitude

func (x *GeoPoint) GetLatitude() float64

func (*GeoPoint) GetLongitude

func (x *GeoPoint) GetLongitude() float64

func (*GeoPoint) ProtoMessage

func (*GeoPoint) ProtoMessage()

func (*GeoPoint) ProtoReflect

func (x *GeoPoint) ProtoReflect() protoreflect.Message

func (*GeoPoint) Reset

func (x *GeoPoint) Reset()

func (*GeoPoint) String

func (x *GeoPoint) 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
	Payload isMessage_Payload `protobuf_oneof:"payload"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetEmpty

func (x *Message) GetEmpty() *Empty

func (*Message) GetMac

func (x *Message) GetMac() string

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

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) 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

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL