Documentation
¶
Index ¶
- Variables
- type Blog
- type BlogSet
- type Device
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (m *Event) GetData() isEvent_Data
- func (x *Event) GetResourceAlert() *ResourceAlert
- func (x *Event) GetResourceChange() *ResourceChange
- func (x *Event) GetType() TYPE
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type Event_ResourceAlert
- type Event_ResourceChange
- type ResourceAlert
- func (*ResourceAlert) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceAlert) GetLevle() string
- func (x *ResourceAlert) GetResourceId() string
- func (*ResourceAlert) ProtoMessage()
- func (x *ResourceAlert) ProtoReflect() protoreflect.Message
- func (x *ResourceAlert) Reset()
- func (x *ResourceAlert) String() string
- type ResourceChange
- func (*ResourceChange) Descriptor() ([]byte, []int)deprecated
- func (x *ResourceChange) GetAction() string
- func (x *ResourceChange) GetResourceId() string
- func (*ResourceChange) ProtoMessage()
- func (x *ResourceChange) ProtoReflect() protoreflect.Message
- func (x *ResourceChange) Reset()
- func (x *ResourceChange) String() string
- type STATUS
- type TYPE
Constants ¶
This section is empty.
Variables ¶
View Source
var ( STATUS_name = map[int32]string{ 0: "DRAFT", 1: "PUBLISHED", } STATUS_value = map[string]int32{ "DRAFT": 0, "PUBLISHED": 1, } )
Enum value maps for STATUS.
View Source
var ( TYPE_name = map[int32]string{ 0: "RESOURCE_CHANGE", 1: "RESOURCE_ALERT", } TYPE_value = map[string]int32{ "RESOURCE_CHANGE": 0, "RESOURCE_ALERT": 1, } )
Enum value maps for TYPE.
View Source
var File_pb_any_proto protoreflect.FileDescriptor
View Source
var File_pb_array_proto protoreflect.FileDescriptor
View Source
var File_pb_enum_proto protoreflect.FileDescriptor
View Source
var File_pb_oneof_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Blog ¶
type Blog struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` Author string `protobuf:"bytes,2,opt,name=author,proto3" json:"author,omitempty"` // tags: {"color": "red", "group": "test"} map[string]string Tags map[string]string `` /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Blog) Descriptor
deprecated
func (*Blog) ProtoMessage ¶
func (*Blog) ProtoMessage()
func (*Blog) ProtoReflect ¶
func (x *Blog) ProtoReflect() protoreflect.Message
type BlogSet ¶
type BlogSet struct { // optional 该值可选, 可以为nil, 因此必须是一个指针 Total *int64 `protobuf:"varint,1,opt,name=total,proto3,oneof" json:"total,omitempty"` // repeated 表示定义数组 // 嵌套message Items []*Blog `protobuf:"bytes,2,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
博客列表
func (*BlogSet) Descriptor
deprecated
func (*BlogSet) ProtoMessage ¶
func (*BlogSet) ProtoMessage()
func (*BlogSet) ProtoReflect ¶
func (x *BlogSet) ProtoReflect() protoreflect.Message
type Device ¶
type Device struct { // "a1", "a2", "xxxxx" DeviceType string `protobuf:"bytes,1,opt,name=device_type,json=deviceType,proto3" json:"device_type,omitempty"` // 设备具体的数据 Data *anypb.Any `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
比如IOT设备上报的报文, 不同设备 上报的数据结构是不一样
func (*Device) Descriptor
deprecated
func (*Device) GetDeviceType ¶
func (*Device) ProtoMessage ¶
func (*Device) ProtoMessage()
func (*Device) ProtoReflect ¶
func (x *Device) ProtoReflect() protoreflect.Message
type Event ¶
type Event struct { Type TYPE `protobuf:"varint,1,opt,name=type,proto3,enum=hello.TYPE" json:"type,omitempty"` // Types that are assignable to Data: // *Event_ResourceChange // *Event_ResourceAlert Data isEvent_Data `protobuf_oneof:"data"` // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
func (*Event) GetResourceAlert ¶
func (x *Event) GetResourceAlert() *ResourceAlert
func (*Event) GetResourceChange ¶
func (x *Event) GetResourceChange() *ResourceChange
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type Event_ResourceAlert ¶
type Event_ResourceAlert struct {
ResourceAlert *ResourceAlert `protobuf:"bytes,3,opt,name=resource_alert,json=resourceAlert,proto3,oneof"`
}
type Event_ResourceChange ¶
type Event_ResourceChange struct {
ResourceChange *ResourceChange `protobuf:"bytes,2,opt,name=resource_change,json=resourceChange,proto3,oneof"`
}
type ResourceAlert ¶
type ResourceAlert struct { ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` // info,warnning, danger Levle string `protobuf:"bytes,2,opt,name=levle,proto3" json:"levle,omitempty"` // contains filtered or unexported fields }
func (*ResourceAlert) Descriptor
deprecated
func (*ResourceAlert) Descriptor() ([]byte, []int)
Deprecated: Use ResourceAlert.ProtoReflect.Descriptor instead.
func (*ResourceAlert) GetLevle ¶
func (x *ResourceAlert) GetLevle() string
func (*ResourceAlert) GetResourceId ¶
func (x *ResourceAlert) GetResourceId() string
func (*ResourceAlert) ProtoMessage ¶
func (*ResourceAlert) ProtoMessage()
func (*ResourceAlert) ProtoReflect ¶
func (x *ResourceAlert) ProtoReflect() protoreflect.Message
func (*ResourceAlert) Reset ¶
func (x *ResourceAlert) Reset()
func (*ResourceAlert) String ¶
func (x *ResourceAlert) String() string
type ResourceChange ¶
type ResourceChange struct { ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"` // create,delete Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"` // contains filtered or unexported fields }
func (*ResourceChange) Descriptor
deprecated
func (*ResourceChange) Descriptor() ([]byte, []int)
Deprecated: Use ResourceChange.ProtoReflect.Descriptor instead.
func (*ResourceChange) GetAction ¶
func (x *ResourceChange) GetAction() string
func (*ResourceChange) GetResourceId ¶
func (x *ResourceChange) GetResourceId() string
func (*ResourceChange) ProtoMessage ¶
func (*ResourceChange) ProtoMessage()
func (*ResourceChange) ProtoReflect ¶
func (x *ResourceChange) ProtoReflect() protoreflect.Message
func (*ResourceChange) Reset ¶
func (x *ResourceChange) Reset()
func (*ResourceChange) String ¶
func (x *ResourceChange) String() string
type STATUS ¶
type STATUS int32
定义文章只有下面几种状态
func (STATUS) Descriptor ¶
func (STATUS) Descriptor() protoreflect.EnumDescriptor
func (STATUS) EnumDescriptor
deprecated
func (STATUS) Number ¶
func (x STATUS) Number() protoreflect.EnumNumber
func (STATUS) Type ¶
func (STATUS) Type() protoreflect.EnumType
type TYPE ¶
type TYPE int32
func (TYPE) Descriptor ¶
func (TYPE) Descriptor() protoreflect.EnumDescriptor
func (TYPE) EnumDescriptor
deprecated
func (TYPE) Number ¶
func (x TYPE) Number() protoreflect.EnumNumber
func (TYPE) Type ¶
func (TYPE) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.