saas-smartAi通信协议标准库
gongshangguo
2022-03-03 d3d05d0eecdd76e86eeb3d28dcd765db042dce17
aiotProto/aiot/aiot_business.pb.go
@@ -20,72 +20,250 @@
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// 请求类型
type RequestType int32
const (
   // 同步请求 默认
   RequestType_sync RequestType = 0
   // 异步请求
   RequestType_Async RequestType = 1
)
var RequestType_name = map[int32]string{
   0: "sync",
   1: "Async",
}
var RequestType_value = map[string]int32{
   "sync":  0,
   "Async": 1,
}
func (x RequestType) String() string {
   return proto.EnumName(RequestType_name, int32(x))
}
func (RequestType) EnumDescriptor() ([]byte, []int) {
   return fileDescriptor_29eca6d4b33e7fd8, []int{0}
}
// 请求的body体
type BusinessReq struct {
   Topic                string   `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
   Authorization        string   `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"`
   Ip                   string   `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
   Port                 string   `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"`
   Req                  []byte   `protobuf:"bytes,5,opt,name=req,proto3" json:"req,omitempty"`
type NodeReq struct {
   // 请求的topic url
   Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
   // token
   Authorization string `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"`
   // 请求指向的ip
   Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
   // 请求的端口 保留字段
   Port string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"`
   // 请求的同步/异步类型
   SyncType RequestType `protobuf:"varint,5,opt,name=syncType,proto3,enum=aiot.RequestType" json:"syncType,omitempty"`
   // 请求业务参数
   Req                  []byte   `protobuf:"bytes,6,opt,name=req,proto3" json:"req,omitempty"`
   XXX_NoUnkeyedLiteral struct{} `json:"-"`
   XXX_unrecognized     []byte   `json:"-"`
   XXX_sizecache        int32    `json:"-"`
}
func (m *BusinessReq) Reset()         { *m = BusinessReq{} }
func (m *BusinessReq) String() string { return proto.CompactTextString(m) }
func (*BusinessReq) ProtoMessage()    {}
func (*BusinessReq) Descriptor() ([]byte, []int) {
func (m *NodeReq) Reset()         { *m = NodeReq{} }
func (m *NodeReq) String() string { return proto.CompactTextString(m) }
func (*NodeReq) ProtoMessage()    {}
func (*NodeReq) Descriptor() ([]byte, []int) {
   return fileDescriptor_29eca6d4b33e7fd8, []int{0}
}
func (m *BusinessReq) XXX_Unmarshal(b []byte) error {
   return xxx_messageInfo_BusinessReq.Unmarshal(m, b)
func (m *NodeReq) XXX_Unmarshal(b []byte) error {
   return xxx_messageInfo_NodeReq.Unmarshal(m, b)
}
func (m *BusinessReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   return xxx_messageInfo_BusinessReq.Marshal(b, m, deterministic)
func (m *NodeReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   return xxx_messageInfo_NodeReq.Marshal(b, m, deterministic)
}
func (m *BusinessReq) XXX_Merge(src proto.Message) {
   xxx_messageInfo_BusinessReq.Merge(m, src)
func (m *NodeReq) XXX_Merge(src proto.Message) {
   xxx_messageInfo_NodeReq.Merge(m, src)
}
func (m *BusinessReq) XXX_Size() int {
   return xxx_messageInfo_BusinessReq.Size(m)
func (m *NodeReq) XXX_Size() int {
   return xxx_messageInfo_NodeReq.Size(m)
}
func (m *BusinessReq) XXX_DiscardUnknown() {
   xxx_messageInfo_BusinessReq.DiscardUnknown(m)
func (m *NodeReq) XXX_DiscardUnknown() {
   xxx_messageInfo_NodeReq.DiscardUnknown(m)
}
var xxx_messageInfo_BusinessReq proto.InternalMessageInfo
var xxx_messageInfo_NodeReq proto.InternalMessageInfo
func (m *BusinessReq) GetTopic() string {
func (m *NodeReq) GetTopic() string {
   if m != nil {
      return m.Topic
   }
   return ""
}
func (m *BusinessReq) GetAuthorization() string {
func (m *NodeReq) GetAuthorization() string {
   if m != nil {
      return m.Authorization
   }
   return ""
}
func (m *BusinessReq) GetIp() string {
func (m *NodeReq) GetIp() string {
   if m != nil {
      return m.Ip
   }
   return ""
}
func (m *BusinessReq) GetPort() string {
func (m *NodeReq) GetPort() string {
   if m != nil {
      return m.Port
   }
   return ""
}
func (m *BusinessReq) GetReq() []byte {
func (m *NodeReq) GetSyncType() RequestType {
   if m != nil {
      return m.SyncType
   }
   return RequestType_sync
}
func (m *NodeReq) GetReq() []byte {
   if m != nil {
      return m.Req
   }
   return nil
}
// 集群请求参数
type ClusterReq struct {
   // 集群ID
   ClusterId string `protobuf:"bytes,1,opt,name=ClusterId,proto3" json:"ClusterId,omitempty"`
   // token
   Authorization string `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"`
   // 请求的同步/异步类型
   SyncType RequestType `protobuf:"varint,3,opt,name=syncType,proto3,enum=aiot.RequestType" json:"syncType,omitempty"`
   // 请求业务参数
   Req                  []byte   `protobuf:"bytes,4,opt,name=req,proto3" json:"req,omitempty"`
   XXX_NoUnkeyedLiteral struct{} `json:"-"`
   XXX_unrecognized     []byte   `json:"-"`
   XXX_sizecache        int32    `json:"-"`
}
func (m *ClusterReq) Reset()         { *m = ClusterReq{} }
func (m *ClusterReq) String() string { return proto.CompactTextString(m) }
func (*ClusterReq) ProtoMessage()    {}
func (*ClusterReq) Descriptor() ([]byte, []int) {
   return fileDescriptor_29eca6d4b33e7fd8, []int{1}
}
func (m *ClusterReq) XXX_Unmarshal(b []byte) error {
   return xxx_messageInfo_ClusterReq.Unmarshal(m, b)
}
func (m *ClusterReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   return xxx_messageInfo_ClusterReq.Marshal(b, m, deterministic)
}
func (m *ClusterReq) XXX_Merge(src proto.Message) {
   xxx_messageInfo_ClusterReq.Merge(m, src)
}
func (m *ClusterReq) XXX_Size() int {
   return xxx_messageInfo_ClusterReq.Size(m)
}
func (m *ClusterReq) XXX_DiscardUnknown() {
   xxx_messageInfo_ClusterReq.DiscardUnknown(m)
}
var xxx_messageInfo_ClusterReq proto.InternalMessageInfo
func (m *ClusterReq) GetClusterId() string {
   if m != nil {
      return m.ClusterId
   }
   return ""
}
func (m *ClusterReq) GetAuthorization() string {
   if m != nil {
      return m.Authorization
   }
   return ""
}
func (m *ClusterReq) GetSyncType() RequestType {
   if m != nil {
      return m.SyncType
   }
   return RequestType_sync
}
func (m *ClusterReq) GetReq() []byte {
   if m != nil {
      return m.Req
   }
   return nil
}
// 设备列表请求参数
type NodesReq struct {
   // 设备列表ID
   NodeIds []string `protobuf:"bytes,1,rep,name=NodeIds,proto3" json:"NodeIds,omitempty"`
   // token
   Authorization string `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"`
   // 请求的同步/异步类型
   SyncType RequestType `protobuf:"varint,3,opt,name=syncType,proto3,enum=aiot.RequestType" json:"syncType,omitempty"`
   // 请求业务参数
   Req                  []byte   `protobuf:"bytes,4,opt,name=req,proto3" json:"req,omitempty"`
   XXX_NoUnkeyedLiteral struct{} `json:"-"`
   XXX_unrecognized     []byte   `json:"-"`
   XXX_sizecache        int32    `json:"-"`
}
func (m *NodesReq) Reset()         { *m = NodesReq{} }
func (m *NodesReq) String() string { return proto.CompactTextString(m) }
func (*NodesReq) ProtoMessage()    {}
func (*NodesReq) Descriptor() ([]byte, []int) {
   return fileDescriptor_29eca6d4b33e7fd8, []int{2}
}
func (m *NodesReq) XXX_Unmarshal(b []byte) error {
   return xxx_messageInfo_NodesReq.Unmarshal(m, b)
}
func (m *NodesReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   return xxx_messageInfo_NodesReq.Marshal(b, m, deterministic)
}
func (m *NodesReq) XXX_Merge(src proto.Message) {
   xxx_messageInfo_NodesReq.Merge(m, src)
}
func (m *NodesReq) XXX_Size() int {
   return xxx_messageInfo_NodesReq.Size(m)
}
func (m *NodesReq) XXX_DiscardUnknown() {
   xxx_messageInfo_NodesReq.DiscardUnknown(m)
}
var xxx_messageInfo_NodesReq proto.InternalMessageInfo
func (m *NodesReq) GetNodeIds() []string {
   if m != nil {
      return m.NodeIds
   }
   return nil
}
func (m *NodesReq) GetAuthorization() string {
   if m != nil {
      return m.Authorization
   }
   return ""
}
func (m *NodesReq) GetSyncType() RequestType {
   if m != nil {
      return m.SyncType
   }
   return RequestType_sync
}
func (m *NodesReq) GetReq() []byte {
   if m != nil {
      return m.Req
   }
@@ -94,9 +272,13 @@
// 响应的body体
type BusinessReply struct {
   Code                 int32    `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
   Msg                  string   `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
   Success              bool     `protobuf:"varint,3,opt,name=success,proto3" json:"success,omitempty"`
   // 返回的错误码
   Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
   // 错误信息
   Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
   // 是否success
   Success bool `protobuf:"varint,3,opt,name=success,proto3" json:"success,omitempty"`
   // 返回结果
   Data                 []byte   `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
   XXX_NoUnkeyedLiteral struct{} `json:"-"`
   XXX_unrecognized     []byte   `json:"-"`
@@ -107,7 +289,7 @@
func (m *BusinessReply) String() string { return proto.CompactTextString(m) }
func (*BusinessReply) ProtoMessage()    {}
func (*BusinessReply) Descriptor() ([]byte, []int) {
   return fileDescriptor_29eca6d4b33e7fd8, []int{1}
   return fileDescriptor_29eca6d4b33e7fd8, []int{3}
}
func (m *BusinessReply) XXX_Unmarshal(b []byte) error {
@@ -157,7 +339,10 @@
}
func init() {
   proto.RegisterType((*BusinessReq)(nil), "aiot.BusinessReq")
   proto.RegisterEnum("aiot.RequestType", RequestType_name, RequestType_value)
   proto.RegisterType((*NodeReq)(nil), "aiot.NodeReq")
   proto.RegisterType((*ClusterReq)(nil), "aiot.ClusterReq")
   proto.RegisterType((*NodesReq)(nil), "aiot.NodesReq")
   proto.RegisterType((*BusinessReply)(nil), "aiot.BusinessReply")
}
@@ -166,22 +351,31 @@
}
var fileDescriptor_29eca6d4b33e7fd8 = []byte{
   // 269 bytes of a gzipped FileDescriptorProto
   0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x50, 0x3d, 0x4f, 0xc3, 0x30,
   0x10, 0x6d, 0xd3, 0x84, 0x8f, 0x4b, 0x5b, 0xd1, 0x2b, 0x83, 0x95, 0xa9, 0x8a, 0x18, 0x3a, 0x05,
   0x09, 0x06, 0x66, 0x58, 0x58, 0x91, 0xfb, 0x03, 0x50, 0xea, 0x58, 0x60, 0x29, 0xc9, 0xb9, 0xb1,
   0x03, 0x2a, 0x0b, 0x7f, 0x1d, 0xf9, 0xd2, 0x0a, 0xe8, 0xf6, 0x3e, 0xfc, 0xfc, 0x4e, 0x0f, 0x96,
   0xa5, 0x21, 0xff, 0xba, 0xed, 0x9d, 0x69, 0xb5, 0x73, 0x85, 0xed, 0xc8, 0x13, 0xc6, 0x41, 0xcc,
   0x16, 0x6c, 0x29, 0x6a, 0x1a, 0x6a, 0x07, 0x23, 0xff, 0x86, 0xf4, 0xe9, 0xf0, 0x54, 0xea, 0x1d,
   0x5e, 0x43, 0xe2, 0xc9, 0x1a, 0x25, 0xc6, 0xab, 0xf1, 0xfa, 0x52, 0x0e, 0x04, 0x6f, 0x60, 0x56,
   0xf6, 0xfe, 0x9d, 0x3a, 0xf3, 0x55, 0x7a, 0x43, 0xad, 0x88, 0xd8, 0xfd, 0x2f, 0xe2, 0x1c, 0x22,
   0x63, 0xc5, 0x84, 0xad, 0xc8, 0x58, 0x44, 0x88, 0x2d, 0x75, 0x5e, 0xc4, 0xac, 0x30, 0xc6, 0x2b,
   0x98, 0x74, 0x7a, 0x27, 0x92, 0xd5, 0x78, 0x3d, 0x95, 0x01, 0xe6, 0x0a, 0x66, 0xbf, 0x07, 0xd8,
   0x7a, 0x1f, 0x62, 0x8a, 0x2a, 0xcd, 0x17, 0x24, 0x92, 0x71, 0x88, 0x35, 0xee, 0xed, 0x50, 0x1b,
   0x20, 0x0a, 0x38, 0x77, 0xbd, 0x52, 0xda, 0x39, 0x6e, 0xbc, 0x90, 0x47, 0x1a, 0xf2, 0x55, 0xe9,
   0x4b, 0xae, 0x9d, 0x4a, 0xc6, 0x77, 0x9f, 0x90, 0x3e, 0x1a, 0xf2, 0x1b, 0xdd, 0x7d, 0x18, 0xa5,
   0xf1, 0x01, 0xd2, 0x67, 0xed, 0x8f, 0xb5, 0xb8, 0x28, 0xc2, 0x2e, 0xc5, 0x9f, 0x1d, 0xb2, 0xe5,
   0xa9, 0x64, 0xeb, 0x7d, 0x3e, 0xc2, 0x5b, 0x48, 0x37, 0xba, 0xad, 0xc2, 0x5f, 0x61, 0xad, 0xf9,
   0xf0, 0xea, 0x25, 0x2c, 0xa9, 0xa8, 0xce, 0x4e, 0x78, 0x3e, 0xda, 0x9e, 0xf1, 0xca, 0xf7, 0x3f,
   0x01, 0x00, 0x00, 0xff, 0xff, 0x73, 0x41, 0x66, 0x2e, 0x95, 0x01, 0x00, 0x00,
   // 412 bytes of a gzipped FileDescriptorProto
   0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x93, 0xb1, 0xce, 0xd3, 0x30,
   0x10, 0xc7, 0xeb, 0x26, 0xf9, 0x48, 0xae, 0xa4, 0xea, 0xe7, 0x8f, 0xc1, 0xaa, 0x18, 0xa2, 0x88,
   0x21, 0x42, 0xa2, 0x48, 0x85, 0x81, 0xf5, 0x83, 0xa9, 0x0b, 0x42, 0x6e, 0x77, 0x94, 0x3a, 0x16,
   0x58, 0x6a, 0xe3, 0x34, 0x76, 0x90, 0xca, 0x2b, 0x30, 0xf1, 0x1a, 0x3c, 0x16, 0x4f, 0x82, 0xce,
   0x4e, 0x68, 0x8b, 0x54, 0xa9, 0x13, 0xdb, 0xfd, 0xef, 0x7c, 0xfd, 0xff, 0x7a, 0x77, 0x81, 0x87,
   0x52, 0x69, 0xfb, 0x79, 0xdb, 0x19, 0x55, 0x4b, 0x63, 0x16, 0x4d, 0xab, 0xad, 0xa6, 0x21, 0x26,
   0xe7, 0xf7, 0xae, 0x24, 0xf4, 0x7e, 0xaf, 0x6b, 0x5f, 0xc8, 0x7f, 0x11, 0x78, 0xf2, 0x51, 0x57,
   0x92, 0xcb, 0x03, 0x7d, 0x06, 0x91, 0xd5, 0x8d, 0x12, 0x8c, 0x64, 0xa4, 0x48, 0xb8, 0x17, 0xf4,
   0x05, 0xa4, 0x65, 0x67, 0xbf, 0xea, 0x56, 0x7d, 0x2f, 0xad, 0xd2, 0x35, 0x1b, 0xbb, 0xea, 0x65,
   0x92, 0x4e, 0x61, 0xac, 0x1a, 0x16, 0xb8, 0xd2, 0x58, 0x35, 0x94, 0x42, 0xd8, 0xe8, 0xd6, 0xb2,
   0xd0, 0x65, 0x5c, 0x4c, 0x5f, 0x41, 0x6c, 0x8e, 0xb5, 0xd8, 0x1c, 0x1b, 0xc9, 0xa2, 0x8c, 0x14,
   0xd3, 0xe5, 0xfd, 0x02, 0x89, 0x16, 0x5c, 0x1e, 0x3a, 0x69, 0x2c, 0x16, 0xf8, 0xdf, 0x27, 0x74,
   0x06, 0x41, 0x2b, 0x0f, 0xec, 0x2e, 0x23, 0xc5, 0x53, 0x8e, 0x61, 0xfe, 0x93, 0x00, 0x7c, 0xd8,
   0x75, 0xc6, 0xca, 0x16, 0x79, 0x9f, 0x43, 0xd2, 0xab, 0x55, 0xd5, 0x33, 0x9f, 0x12, 0x37, 0x72,
   0x9f, 0x33, 0x05, 0x37, 0x33, 0x85, 0x27, 0xa6, 0x1f, 0x04, 0x62, 0x1c, 0xa0, 0x41, 0x22, 0xe6,
   0x87, 0xb9, 0xaa, 0x0c, 0x23, 0x59, 0x50, 0x24, 0x7c, 0x90, 0xff, 0x8b, 0x46, 0x40, 0xfa, 0xbe,
   0xdf, 0x3c, 0x97, 0xcd, 0xee, 0x88, 0x7b, 0x10, 0xba, 0x92, 0x6e, 0x3c, 0x11, 0x77, 0x31, 0xb6,
   0xed, 0xcd, 0x97, 0x9e, 0x00, 0x43, 0xe4, 0x36, 0x9d, 0x10, 0xd2, 0x18, 0x67, 0x1b, 0xf3, 0x41,
   0x62, 0x7f, 0x55, 0xda, 0xb2, 0xf7, 0x70, 0xf1, 0xcb, 0x1c, 0x26, 0x67, 0x3c, 0x34, 0x86, 0x10,
   0x89, 0x66, 0x23, 0x9a, 0x40, 0xf4, 0xe8, 0x42, 0xb2, 0xfc, 0x4d, 0x60, 0xf2, 0xa8, 0xb4, 0x5d,
   0xcb, 0xf6, 0x9b, 0x12, 0x92, 0x2e, 0x01, 0xd6, 0xb2, 0xae, 0x36, 0x1a, 0x07, 0x42, 0x53, 0xff,
   0xaf, 0xfa, 0xc3, 0x9b, 0x3f, 0x78, 0x79, 0x41, 0x9e, 0x8f, 0xe8, 0x6b, 0x98, 0x60, 0x0f, 0xfe,
   0x0c, 0x0e, 0x77, 0xea, 0x5f, 0x7d, 0xc2, 0xbb, 0x15, 0x7a, 0x37, 0xff, 0x47, 0xe7, 0x23, 0xfa,
   0x0e, 0x52, 0x6f, 0xd2, 0x5f, 0x01, 0x9d, 0xf9, 0x27, 0xa7, 0x9b, 0xb9, 0x66, 0xf5, 0xd6, 0x5b,
   0x79, 0x3c, 0x33, 0x58, 0x0d, 0x7b, 0xbd, 0xd2, 0xb5, 0xbd, 0x73, 0xdf, 0xd0, 0x9b, 0x3f, 0x01,
   0x00, 0x00, 0xff, 0xff, 0xe4, 0x20, 0xab, 0x58, 0x73, 0x03, 0x00, 0x00,
}