jl-iot/mqtt/proto/mqtt.pb.go

497 lines
14 KiB
Go
Raw Normal View History

2023-12-15 18:08:06 +08:00
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc v4.23.1
// source: mqtt/mqtt.proto
package proto
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ServiceState int32
const (
ServiceState_Normal ServiceState = 0 // 正常
ServiceState_Offline ServiceState = 1 // 离线
)
// Enum value maps for ServiceState.
var (
ServiceState_name = map[int32]string{
0: "Normal",
1: "Offline",
}
ServiceState_value = map[string]int32{
"Normal": 0,
"Offline": 1,
}
)
func (x ServiceState) Enum() *ServiceState {
p := new(ServiceState)
*p = x
return p
}
func (x ServiceState) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ServiceState) Descriptor() protoreflect.EnumDescriptor {
return file_mqtt_mqtt_proto_enumTypes[0].Descriptor()
}
func (ServiceState) Type() protoreflect.EnumType {
return &file_mqtt_mqtt_proto_enumTypes[0]
}
func (x ServiceState) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ServiceState.Descriptor instead.
func (ServiceState) EnumDescriptor() ([]byte, []int) {
return file_mqtt_mqtt_proto_rawDescGZIP(), []int{0}
}
// IOT服务状态
type IotServiceState struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // 服务编号
State ServiceState `protobuf:"varint,2,opt,name=state,proto3,enum=mqtt_api.ServiceState" json:"state,omitempty"` // 服务状态
}
func (x *IotServiceState) Reset() {
*x = IotServiceState{}
if protoimpl.UnsafeEnabled {
mi := &file_mqtt_mqtt_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IotServiceState) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IotServiceState) ProtoMessage() {}
func (x *IotServiceState) ProtoReflect() protoreflect.Message {
mi := &file_mqtt_mqtt_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IotServiceState.ProtoReflect.Descriptor instead.
func (*IotServiceState) Descriptor() ([]byte, []int) {
return file_mqtt_mqtt_proto_rawDescGZIP(), []int{0}
}
func (x *IotServiceState) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *IotServiceState) GetState() ServiceState {
if x != nil {
return x.State
}
return ServiceState_Normal
}
// IOT服务获取日志请求
type IotServiceLogReq struct {
2023-12-15 18:08:06 +08:00
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // 服务编号
Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` // 日志条数
2023-12-15 18:08:06 +08:00
}
func (x *IotServiceLogReq) Reset() {
*x = IotServiceLogReq{}
2023-12-15 18:08:06 +08:00
if protoimpl.UnsafeEnabled {
mi := &file_mqtt_mqtt_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IotServiceLogReq) String() string {
2023-12-15 18:08:06 +08:00
return protoimpl.X.MessageStringOf(x)
}
func (*IotServiceLogReq) ProtoMessage() {}
2023-12-15 18:08:06 +08:00
func (x *IotServiceLogReq) ProtoReflect() protoreflect.Message {
2023-12-15 18:08:06 +08:00
mi := &file_mqtt_mqtt_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IotServiceLogReq.ProtoReflect.Descriptor instead.
func (*IotServiceLogReq) Descriptor() ([]byte, []int) {
2023-12-15 18:08:06 +08:00
return file_mqtt_mqtt_proto_rawDescGZIP(), []int{1}
}
func (x *IotServiceLogReq) GetCode() string {
2023-12-15 18:08:06 +08:00
if x != nil {
return x.Code
}
return ""
}
func (x *IotServiceLogReq) GetCount() int32 {
2023-12-15 18:08:06 +08:00
if x != nil {
return x.Count
2023-12-15 18:08:06 +08:00
}
return 0
2023-12-15 18:08:06 +08:00
}
// IOT服务日志响应
type IotServiceLogResp struct {
2023-12-15 18:08:06 +08:00
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // 服务编号
Logs []string `protobuf:"bytes,4,rep,name=logs,proto3" json:"logs,omitempty"` // 日志
2023-12-15 18:08:06 +08:00
}
func (x *IotServiceLogResp) Reset() {
*x = IotServiceLogResp{}
2023-12-15 18:08:06 +08:00
if protoimpl.UnsafeEnabled {
mi := &file_mqtt_mqtt_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IotServiceLogResp) String() string {
2023-12-15 18:08:06 +08:00
return protoimpl.X.MessageStringOf(x)
}
func (*IotServiceLogResp) ProtoMessage() {}
2023-12-15 18:08:06 +08:00
func (x *IotServiceLogResp) ProtoReflect() protoreflect.Message {
2023-12-15 18:08:06 +08:00
mi := &file_mqtt_mqtt_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IotServiceLogResp.ProtoReflect.Descriptor instead.
func (*IotServiceLogResp) Descriptor() ([]byte, []int) {
2023-12-15 18:08:06 +08:00
return file_mqtt_mqtt_proto_rawDescGZIP(), []int{2}
}
func (x *IotServiceLogResp) GetCode() string {
2023-12-15 18:08:06 +08:00
if x != nil {
return x.Code
}
return ""
}
func (x *IotServiceLogResp) GetLogs() []string {
if x != nil {
return x.Logs
}
return nil
}
2023-12-15 18:08:06 +08:00
// IOT驱动数据
type IotQd struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // 服务编号
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // 驱动数据
}
func (x *IotQd) Reset() {
*x = IotQd{}
if protoimpl.UnsafeEnabled {
mi := &file_mqtt_mqtt_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IotQd) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IotQd) ProtoMessage() {}
func (x *IotQd) ProtoReflect() protoreflect.Message {
mi := &file_mqtt_mqtt_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IotQd.ProtoReflect.Descriptor instead.
func (*IotQd) Descriptor() ([]byte, []int) {
return file_mqtt_mqtt_proto_rawDescGZIP(), []int{3}
}
func (x *IotQd) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *IotQd) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
// IOT采集数据
type IotCj struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // 服务编号
Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // 采集数据
}
func (x *IotCj) Reset() {
*x = IotCj{}
if protoimpl.UnsafeEnabled {
mi := &file_mqtt_mqtt_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *IotCj) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*IotCj) ProtoMessage() {}
func (x *IotCj) ProtoReflect() protoreflect.Message {
mi := &file_mqtt_mqtt_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use IotCj.ProtoReflect.Descriptor instead.
func (*IotCj) Descriptor() ([]byte, []int) {
return file_mqtt_mqtt_proto_rawDescGZIP(), []int{4}
}
func (x *IotCj) GetCode() string {
if x != nil {
return x.Code
}
return ""
}
func (x *IotCj) GetData() []byte {
if x != nil {
return x.Data
}
return nil
}
var File_mqtt_mqtt_proto protoreflect.FileDescriptor
var file_mqtt_mqtt_proto_rawDesc = []byte{
0x0a, 0x0f, 0x6d, 0x71, 0x74, 0x74, 0x2f, 0x6d, 0x71, 0x74, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x08, 0x6d, 0x71, 0x74, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x22, 0x53, 0x0a, 0x0f, 0x49,
0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x12,
0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f,
0x64, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x16, 0x2e, 0x6d, 0x71, 0x74, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x72,
0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65,
0x22, 0x3c, 0x0a, 0x10, 0x49, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x6f,
0x67, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x3b,
0x0a, 0x11, 0x49, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4c, 0x6f, 0x67, 0x52,
2023-12-15 18:08:06 +08:00
0x65, 0x73, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18,
0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x22, 0x2f, 0x0a, 0x05, 0x49,
0x6f, 0x74, 0x51, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x2f, 0x0a, 0x05,
0x49, 0x6f, 0x74, 0x43, 0x6a, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74,
0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x27, 0x0a,
0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x0a,
0x06, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4f, 0x66, 0x66,
0x6c, 0x69, 0x6e, 0x65, 0x10, 0x01, 0x42, 0x0e, 0x5a, 0x0c, 0x2e, 0x2f, 0x6d, 0x71, 0x74, 0x74,
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
2023-12-15 18:08:06 +08:00
}
var (
file_mqtt_mqtt_proto_rawDescOnce sync.Once
file_mqtt_mqtt_proto_rawDescData = file_mqtt_mqtt_proto_rawDesc
)
func file_mqtt_mqtt_proto_rawDescGZIP() []byte {
file_mqtt_mqtt_proto_rawDescOnce.Do(func() {
file_mqtt_mqtt_proto_rawDescData = protoimpl.X.CompressGZIP(file_mqtt_mqtt_proto_rawDescData)
})
return file_mqtt_mqtt_proto_rawDescData
}
var file_mqtt_mqtt_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
2023-12-15 18:08:06 +08:00
var file_mqtt_mqtt_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
var file_mqtt_mqtt_proto_goTypes = []interface{}{
(ServiceState)(0), // 0: mqtt_api.ServiceState
(*IotServiceState)(nil), // 1: mqtt_api.IotServiceState
(*IotServiceLogReq)(nil), // 2: mqtt_api.IotServiceLogReq
(*IotServiceLogResp)(nil), // 3: mqtt_api.IotServiceLogResp
(*IotQd)(nil), // 4: mqtt_api.IotQd
(*IotCj)(nil), // 5: mqtt_api.IotCj
2023-12-15 18:08:06 +08:00
}
var file_mqtt_mqtt_proto_depIdxs = []int32{
0, // 0: mqtt_api.IotServiceState.state:type_name -> mqtt_api.ServiceState
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
2023-12-15 18:08:06 +08:00
}
func init() { file_mqtt_mqtt_proto_init() }
func file_mqtt_mqtt_proto_init() {
if File_mqtt_mqtt_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_mqtt_mqtt_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IotServiceState); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_mqtt_mqtt_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IotServiceLogReq); i {
2023-12-15 18:08:06 +08:00
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_mqtt_mqtt_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IotServiceLogResp); i {
2023-12-15 18:08:06 +08:00
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_mqtt_mqtt_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IotQd); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_mqtt_mqtt_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*IotCj); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_mqtt_mqtt_proto_rawDesc,
NumEnums: 1,
2023-12-15 18:08:06 +08:00
NumMessages: 5,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_mqtt_mqtt_proto_goTypes,
DependencyIndexes: file_mqtt_mqtt_proto_depIdxs,
EnumInfos: file_mqtt_mqtt_proto_enumTypes,
MessageInfos: file_mqtt_mqtt_proto_msgTypes,
}.Build()
File_mqtt_mqtt_proto = out.File
file_mqtt_mqtt_proto_rawDesc = nil
file_mqtt_mqtt_proto_goTypes = nil
file_mqtt_mqtt_proto_depIdxs = nil
}