saas-smartAi通信协议标准库
gongshangguo
2022-03-04 16e34995996fc5884de58b01286e34a4e3bc75d0
aiotProto/aiot/aiot_business.pb.go
@@ -48,20 +48,101 @@
   return fileDescriptor_29eca6d4b33e7fd8, []int{0}
}
// 请求方式
type RequestMethod int32
const (
   // 默认
   RequestMethod_MethodDefault RequestMethod = 0
   // post请求
   RequestMethod_Post RequestMethod = 1
   // get请求
   RequestMethod_Get RequestMethod = 2
   // put请求
   RequestMethod_Put RequestMethod = 3
   // delete请求
   RequestMethod_Delete RequestMethod = 4
)
var RequestMethod_name = map[int32]string{
   0: "MethodDefault",
   1: "Post",
   2: "Get",
   3: "Put",
   4: "Delete",
}
var RequestMethod_value = map[string]int32{
   "MethodDefault": 0,
   "Post":          1,
   "Get":           2,
   "Put":           3,
   "Delete":        4,
}
func (x RequestMethod) String() string {
   return proto.EnumName(RequestMethod_name, int32(x))
}
func (RequestMethod) EnumDescriptor() ([]byte, []int) {
   return fileDescriptor_29eca6d4b33e7fd8, []int{1}
}
// 请求header
type RequestContentType int32
const (
   RequestContentType_ContentTypeDefault            RequestContentType = 0
   RequestContentType_ApplicationJson               RequestContentType = 1
   RequestContentType_ApplicationXWwwFormUrlencoded RequestContentType = 2
   RequestContentType_MultipartFormData             RequestContentType = 3
   RequestContentType_ApplicationXml                RequestContentType = 4
)
var RequestContentType_name = map[int32]string{
   0: "ContentTypeDefault",
   1: "ApplicationJson",
   2: "ApplicationXWwwFormUrlencoded",
   3: "MultipartFormData",
   4: "ApplicationXml",
}
var RequestContentType_value = map[string]int32{
   "ContentTypeDefault":            0,
   "ApplicationJson":               1,
   "ApplicationXWwwFormUrlencoded": 2,
   "MultipartFormData":             3,
   "ApplicationXml":                4,
}
func (x RequestContentType) String() string {
   return proto.EnumName(RequestContentType_name, int32(x))
}
func (RequestContentType) EnumDescriptor() ([]byte, []int) {
   return fileDescriptor_29eca6d4b33e7fd8, []int{2}
}
// 请求的body体
type NodeReq struct {
   // 请求的topic url
   Topic string `protobuf:"bytes,1,opt,name=topic,proto3" json:"topic,omitempty"`
   // 节点ID
   NodeId string `protobuf:"bytes,2,opt,name=nodeId,proto3" json:"nodeId,omitempty"`
   // token
   Authorization string `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"`
   Authorization string `protobuf:"bytes,3,opt,name=authorization,proto3" json:"authorization,omitempty"`
   // 请求指向的ip
   Ip string `protobuf:"bytes,3,opt,name=ip,proto3" json:"ip,omitempty"`
   Ip string `protobuf:"bytes,4,opt,name=ip,proto3" json:"ip,omitempty"`
   // 请求的端口 保留字段
   Port string `protobuf:"bytes,4,opt,name=port,proto3" json:"port,omitempty"`
   Port string `protobuf:"bytes,5,opt,name=port,proto3" json:"port,omitempty"`
   // 请求的同步/异步类型
   SyncType RequestType `protobuf:"varint,5,opt,name=syncType,proto3,enum=aiot.RequestType" json:"syncType,omitempty"`
   SyncType RequestType `protobuf:"varint,6,opt,name=syncType,proto3,enum=aiot.RequestType" json:"syncType,omitempty"`
   // method
   Method RequestMethod `protobuf:"varint,7,opt,name=method,proto3,enum=aiot.RequestMethod" json:"method,omitempty"`
   // content-type
   ContentType RequestContentType `protobuf:"varint,8,opt,name=contentType,proto3,enum=aiot.RequestContentType" json:"contentType,omitempty"`
   // 请求业务参数
   Req                  []byte   `protobuf:"bytes,6,opt,name=req,proto3" json:"req,omitempty"`
   Req                  []byte   `protobuf:"bytes,9,opt,name=req,proto3" json:"req,omitempty"`
   XXX_NoUnkeyedLiteral struct{} `json:"-"`
   XXX_unrecognized     []byte   `json:"-"`
   XXX_sizecache        int32    `json:"-"`
@@ -99,6 +180,13 @@
   return ""
}
func (m *NodeReq) GetNodeId() string {
   if m != nil {
      return m.NodeId
   }
   return ""
}
func (m *NodeReq) GetAuthorization() string {
   if m != nil {
      return m.Authorization
@@ -127,6 +215,20 @@
   return RequestType_sync
}
func (m *NodeReq) GetMethod() RequestMethod {
   if m != nil {
      return m.Method
   }
   return RequestMethod_MethodDefault
}
func (m *NodeReq) GetContentType() RequestContentType {
   if m != nil {
      return m.ContentType
   }
   return RequestContentType_ContentTypeDefault
}
func (m *NodeReq) GetReq() []byte {
   if m != nil {
      return m.Req
@@ -137,13 +239,17 @@
// 集群请求参数
type ClusterReq struct {
   // 集群ID
   ClusterId string `protobuf:"bytes,1,opt,name=ClusterId,proto3" json:"ClusterId,omitempty"`
   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"`
   // method
   Method RequestMethod `protobuf:"varint,4,opt,name=method,proto3,enum=aiot.RequestMethod" json:"method,omitempty"`
   // content-type
   ContentType RequestContentType `protobuf:"varint,5,opt,name=contentType,proto3,enum=aiot.RequestContentType" json:"contentType,omitempty"`
   // 请求业务参数
   Req                  []byte   `protobuf:"bytes,4,opt,name=req,proto3" json:"req,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:"-"`
@@ -195,6 +301,20 @@
   return RequestType_sync
}
func (m *ClusterReq) GetMethod() RequestMethod {
   if m != nil {
      return m.Method
   }
   return RequestMethod_MethodDefault
}
func (m *ClusterReq) GetContentType() RequestContentType {
   if m != nil {
      return m.ContentType
   }
   return RequestContentType_ContentTypeDefault
}
func (m *ClusterReq) GetReq() []byte {
   if m != nil {
      return m.Req
@@ -205,13 +325,17 @@
// 设备列表请求参数
type NodesReq struct {
   // 设备列表ID
   NodeIds []string `protobuf:"bytes,1,rep,name=NodeIds,proto3" json:"NodeIds,omitempty"`
   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"`
   // method
   Method RequestMethod `protobuf:"varint,4,opt,name=method,proto3,enum=aiot.RequestMethod" json:"method,omitempty"`
   // content-type
   ContentType RequestContentType `protobuf:"varint,5,opt,name=contentType,proto3,enum=aiot.RequestContentType" json:"contentType,omitempty"`
   // 请求业务参数
   Req                  []byte   `protobuf:"bytes,4,opt,name=req,proto3" json:"req,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:"-"`
@@ -261,6 +385,20 @@
      return m.SyncType
   }
   return RequestType_sync
}
func (m *NodesReq) GetMethod() RequestMethod {
   if m != nil {
      return m.Method
   }
   return RequestMethod_MethodDefault
}
func (m *NodesReq) GetContentType() RequestContentType {
   if m != nil {
      return m.ContentType
   }
   return RequestContentType_ContentTypeDefault
}
func (m *NodesReq) GetReq() []byte {
@@ -340,6 +478,8 @@
func init() {
   proto.RegisterEnum("aiot.RequestType", RequestType_name, RequestType_value)
   proto.RegisterEnum("aiot.RequestMethod", RequestMethod_name, RequestMethod_value)
   proto.RegisterEnum("aiot.RequestContentType", RequestContentType_name, RequestContentType_value)
   proto.RegisterType((*NodeReq)(nil), "aiot.NodeReq")
   proto.RegisterType((*ClusterReq)(nil), "aiot.ClusterReq")
   proto.RegisterType((*NodesReq)(nil), "aiot.NodesReq")
@@ -351,31 +491,43 @@
}
var fileDescriptor_29eca6d4b33e7fd8 = []byte{
   // 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,
   // 602 bytes of a gzipped FileDescriptorProto
   0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x54, 0xcf, 0x6e, 0xd4, 0x3e,
   0x10, 0x5e, 0x27, 0xd9, 0x7f, 0xb3, 0xcd, 0xfe, 0xbc, 0xd3, 0x1f, 0x95, 0x55, 0x81, 0xb4, 0xac,
   0x38, 0xac, 0x8a, 0x28, 0x52, 0xe1, 0x80, 0xb8, 0x95, 0x56, 0xa0, 0x56, 0x2a, 0xaa, 0xdc, 0x22,
   0xb8, 0xa1, 0xd4, 0x31, 0x34, 0x52, 0x12, 0xa7, 0xb1, 0x43, 0x55, 0x5e, 0x82, 0x07, 0xe1, 0xad,
   0x78, 0x06, 0x4e, 0x9c, 0x90, 0x9d, 0x2c, 0x9b, 0xa5, 0xf4, 0x50, 0x8e, 0xdc, 0x66, 0xe6, 0x9b,
   0xcf, 0xf6, 0x37, 0x7f, 0x0c, 0xeb, 0x51, 0xa2, 0xcc, 0xfb, 0xb3, 0x4a, 0x27, 0xb9, 0xd4, 0x7a,
   0xbb, 0x28, 0x95, 0x51, 0x18, 0xd8, 0xe0, 0xe6, 0xc4, 0x41, 0x42, 0x65, 0x99, 0xca, 0x6b, 0x60,
   0xf6, 0xd5, 0x83, 0xfe, 0x6b, 0x15, 0x4b, 0x2e, 0x2f, 0xf0, 0x7f, 0xe8, 0x1a, 0x55, 0x24, 0x82,
   0x91, 0x29, 0x99, 0x0f, 0x79, 0xed, 0xe0, 0x06, 0xf4, 0x72, 0x15, 0xcb, 0x83, 0x98, 0x79, 0x2e,
   0xdc, 0x78, 0xf8, 0x00, 0xc2, 0xa8, 0x32, 0xe7, 0xaa, 0x4c, 0x3e, 0x47, 0x26, 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e, 0x1c, 0x86, 0x75, 0xf7, 0x9a, 0x9f, 0x6a, 0xb3,
   0x69, 0xff, 0x4a, 0x5f, 0x66, 0x1d, 0x7c, 0x0c, 0x23, 0xcb, 0xb1, 0xc7, 0xd8, 0x19, 0x1d, 0xd7,
   0x59, 0xc7, 0xf6, 0xa3, 0x13, 0x2a, 0xdd, 0xfc, 0xcd, 0x9f, 0x75, 0xf0, 0x19, 0x84, 0xf5, 0x25,
   0xcd, 0x52, 0x23, 0xad, 0x53, 0x96, 0x3b, 0x7e, 0xd3, 0x55, 0x4f, 0xeb, 0xab, 0xea, 0xe7, 0xe9,
   0xc5, 0x55, 0x8b, 0xf5, 0xb8, 0x81, 0x75, 0xd6, 0x73, 0x9f, 0xee, 0x93, 0x9f, 0x01, 0x00, 0x00,
   0xff, 0xff, 0x01, 0x36, 0xb5, 0x8f, 0xa4, 0x05, 0x00, 0x00,
}