去除u8区的高区操作功能

This commit is contained in:
algotao
2025-09-09 11:03:25 +08:00
parent fff023b56d
commit fade72885f
8 changed files with 369 additions and 216 deletions

450
cmd.pb.go
View File

@@ -289,6 +289,7 @@ func (CmdErrorCode) EnumDescriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{3} return file_cmd_proto_rawDescGZIP(), []int{3}
} }
// TaskStatus 任务状态
type TaskStatus int32 type TaskStatus int32
const ( const (
@@ -353,22 +354,22 @@ func (TaskStatus) EnumDescriptor() ([]byte, []int) {
type OS int32 type OS int32
const ( const (
OS_UNKNOWN OS = 0 OS_OS_UNKNOWN OS = 0
OS_IOS OS = 1 OS_IOS OS = 1
OS_ANDROID OS = 2 OS_ANDROID OS = 2
) )
// Enum value maps for OS. // Enum value maps for OS.
var ( var (
OS_name = map[int32]string{ OS_name = map[int32]string{
0: "UNKNOWN", 0: "OS_UNKNOWN",
1: "IOS", 1: "IOS",
2: "ANDROID", 2: "ANDROID",
} }
OS_value = map[string]int32{ OS_value = map[string]int32{
"UNKNOWN": 0, "OS_UNKNOWN": 0,
"IOS": 1, "IOS": 1,
"ANDROID": 2, "ANDROID": 2,
} }
) )
@@ -399,6 +400,59 @@ func (OS) EnumDescriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{5} return file_cmd_proto_rawDescGZIP(), []int{5}
} }
// MAX 最大限定
type MAX int32
const (
MAX_MAX_UNKNOWN MAX = 0
MAX_U8 MAX = 64
MAX_U32 MAX = 8
MAX_FLAG MAX = 4
)
// Enum value maps for MAX.
var (
MAX_name = map[int32]string{
0: "MAX_UNKNOWN",
64: "U8",
8: "U32",
4: "FLAG",
}
MAX_value = map[string]int32{
"MAX_UNKNOWN": 0,
"U8": 64,
"U32": 8,
"FLAG": 4,
}
)
func (x MAX) Enum() *MAX {
p := new(MAX)
*p = x
return p
}
func (x MAX) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MAX) Descriptor() protoreflect.EnumDescriptor {
return file_cmd_proto_enumTypes[6].Descriptor()
}
func (MAX) Type() protoreflect.EnumType {
return &file_cmd_proto_enumTypes[6]
}
func (x MAX) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MAX.Descriptor instead.
func (MAX) EnumDescriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{6}
}
// SaasReq 命令请求 // SaasReq 命令请求
type SaasReq struct { type SaasReq struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
@@ -957,10 +1011,11 @@ func (x *WriteItem) GetWriteFlagsWithExpire() *FlagsWithExpire {
// Bytes 写入byte区域 // Bytes 写入byte区域
type Bytes struct { type Bytes struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` // 写入的byte Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` // 写入的byte
Index_1 uint64 `protobuf:"varint,2,opt,name=index_1,json=index1,proto3" json:"index_1,omitempty"` // 写入byte的索引值(0..63) Index_1 uint64 `protobuf:"varint,2,opt,name=index_1,json=index1,proto3" json:"index_1,omitempty"` // 写入byte的索引值(0..63)
Index_2 uint64 `protobuf:"varint,3,opt,name=index_2,json=index2,proto3" json:"index_2,omitempty"` // 写入byte的索引值(64..127) // Deprecated: Marked as deprecated in cmd.proto.
Index_2 uint64 `protobuf:"varint,3,opt,name=index_2,json=index2,proto3" json:"index_2,omitempty"` // **已弃用 写入byte的索引值(64..127)
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@@ -1009,6 +1064,7 @@ func (x *Bytes) GetIndex_1() uint64 {
return 0 return 0
} }
// Deprecated: Marked as deprecated in cmd.proto.
func (x *Bytes) GetIndex_2() uint64 { func (x *Bytes) GetIndex_2() uint64 {
if x != nil { if x != nil {
return x.Index_2 return x.Index_2
@@ -1020,7 +1076,7 @@ func (x *Bytes) GetIndex_2() uint64 {
type Uint32S struct { type Uint32S struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
Uint32S []uint32 `protobuf:"varint,1,rep,packed,name=uint32s,proto3" json:"uint32s,omitempty"` // 写入的uint32 Uint32S []uint32 `protobuf:"varint,1,rep,packed,name=uint32s,proto3" json:"uint32s,omitempty"` // 写入的uint32
Index_1 uint64 `protobuf:"varint,2,opt,name=index_1,json=index1,proto3" json:"index_1,omitempty"` // 写入uint32的索引值(0..15) 最多 16 Index_1 uint64 `protobuf:"varint,2,opt,name=index_1,json=index1,proto3" json:"index_1,omitempty"` // 写入uint32的索引值(0..7) 最多 8
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@@ -1073,7 +1129,7 @@ func (x *Uint32S) GetIndex_1() uint64 {
type FlagsWithExpire struct { type FlagsWithExpire struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
FlagsWithExpire []*FlagWithExpire `protobuf:"bytes,1,rep,name=flags_with_expire,json=flagsWithExpire,proto3" json:"flags_with_expire,omitempty"` // 写入的标志位 FlagsWithExpire []*FlagWithExpire `protobuf:"bytes,1,rep,name=flags_with_expire,json=flagsWithExpire,proto3" json:"flags_with_expire,omitempty"` // 写入的标志位
Index_1 uint64 `protobuf:"varint,2,opt,name=index_1,json=index1,proto3" json:"index_1,omitempty"` // 写入标志位的索引值 Index_1 uint64 `protobuf:"varint,2,opt,name=index_1,json=index1,proto3" json:"index_1,omitempty"` // 写入标志位的索引值(0..3) 最多 4 个
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
@@ -1912,7 +1968,7 @@ func (x *ScriptRun) GetOs() OS {
if x != nil { if x != nil {
return x.Os return x.Os
} }
return OS_UNKNOWN return OS_OS_UNKNOWN
} }
// ScriptUpdate 升级脚本 // ScriptUpdate 升级脚本
@@ -2227,18 +2283,70 @@ func (*SaasRes_ScriptRunRes) isSaasRes_Res() {}
func (*SaasRes_ScriptUpdateRes) isSaasRes_Res() {} func (*SaasRes_ScriptUpdateRes) isSaasRes_Res() {}
type DataSpace struct {
state protoimpl.MessageState `protogen:"open.v1"`
Did []string `protobuf:"bytes,1,rep,name=did,proto3" json:"did,omitempty"` // 设备ID区
Wuid []string `protobuf:"bytes,2,rep,name=wuid,proto3" json:"wuid,omitempty"` // OpenID区
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *DataSpace) Reset() {
*x = DataSpace{}
mi := &file_cmd_proto_msgTypes[24]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *DataSpace) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DataSpace) ProtoMessage() {}
func (x *DataSpace) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[24]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DataSpace.ProtoReflect.Descriptor instead.
func (*DataSpace) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{24}
}
func (x *DataSpace) GetDid() []string {
if x != nil {
return x.Did
}
return nil
}
func (x *DataSpace) GetWuid() []string {
if x != nil {
return x.Wuid
}
return nil
}
// InfoRes 账号信息返回 // InfoRes 账号信息返回
type InfoRes struct { type InfoRes struct {
state protoimpl.MessageState `protogen:"open.v1"` state protoimpl.MessageState `protogen:"open.v1"`
DataspaceId []string `protobuf:"bytes,1,rep,name=dataspace_id,json=dataspaceId,proto3" json:"dataspace_id,omitempty"` // 可用数据区列表 Dataspace *DataSpace `protobuf:"bytes,1,opt,name=dataspace,proto3" json:"dataspace,omitempty"` // 可用数据区列表
TargetId []string `protobuf:"bytes,2,rep,name=target_id,json=targetId,proto3" json:"target_id,omitempty"` // 策略ID列表 TargetId []string `protobuf:"bytes,2,rep,name=target_id,json=targetId,proto3" json:"target_id,omitempty"` // 策略ID列表
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
} }
func (x *InfoRes) Reset() { func (x *InfoRes) Reset() {
*x = InfoRes{} *x = InfoRes{}
mi := &file_cmd_proto_msgTypes[24] mi := &file_cmd_proto_msgTypes[25]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -2250,7 +2358,7 @@ func (x *InfoRes) String() string {
func (*InfoRes) ProtoMessage() {} func (*InfoRes) ProtoMessage() {}
func (x *InfoRes) ProtoReflect() protoreflect.Message { func (x *InfoRes) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[24] mi := &file_cmd_proto_msgTypes[25]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -2263,12 +2371,12 @@ func (x *InfoRes) ProtoReflect() protoreflect.Message {
// Deprecated: Use InfoRes.ProtoReflect.Descriptor instead. // Deprecated: Use InfoRes.ProtoReflect.Descriptor instead.
func (*InfoRes) Descriptor() ([]byte, []int) { func (*InfoRes) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{24} return file_cmd_proto_rawDescGZIP(), []int{25}
} }
func (x *InfoRes) GetDataspaceId() []string { func (x *InfoRes) GetDataspace() *DataSpace {
if x != nil { if x != nil {
return x.DataspaceId return x.Dataspace
} }
return nil return nil
} }
@@ -2292,7 +2400,7 @@ type ReadRes struct {
func (x *ReadRes) Reset() { func (x *ReadRes) Reset() {
*x = ReadRes{} *x = ReadRes{}
mi := &file_cmd_proto_msgTypes[25] mi := &file_cmd_proto_msgTypes[26]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -2304,7 +2412,7 @@ func (x *ReadRes) String() string {
func (*ReadRes) ProtoMessage() {} func (*ReadRes) ProtoMessage() {}
func (x *ReadRes) ProtoReflect() protoreflect.Message { func (x *ReadRes) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[25] mi := &file_cmd_proto_msgTypes[26]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -2317,7 +2425,7 @@ func (x *ReadRes) ProtoReflect() protoreflect.Message {
// Deprecated: Use ReadRes.ProtoReflect.Descriptor instead. // Deprecated: Use ReadRes.ProtoReflect.Descriptor instead.
func (*ReadRes) Descriptor() ([]byte, []int) { func (*ReadRes) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{25} return file_cmd_proto_rawDescGZIP(), []int{26}
} }
func (x *ReadRes) GetSuccCmdCount() uint32 { func (x *ReadRes) GetSuccCmdCount() uint32 {
@@ -2353,7 +2461,7 @@ type WriteRes struct {
func (x *WriteRes) Reset() { func (x *WriteRes) Reset() {
*x = WriteRes{} *x = WriteRes{}
mi := &file_cmd_proto_msgTypes[26] mi := &file_cmd_proto_msgTypes[27]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -2365,7 +2473,7 @@ func (x *WriteRes) String() string {
func (*WriteRes) ProtoMessage() {} func (*WriteRes) ProtoMessage() {}
func (x *WriteRes) ProtoReflect() protoreflect.Message { func (x *WriteRes) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[26] mi := &file_cmd_proto_msgTypes[27]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -2378,7 +2486,7 @@ func (x *WriteRes) ProtoReflect() protoreflect.Message {
// Deprecated: Use WriteRes.ProtoReflect.Descriptor instead. // Deprecated: Use WriteRes.ProtoReflect.Descriptor instead.
func (*WriteRes) Descriptor() ([]byte, []int) { func (*WriteRes) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{26} return file_cmd_proto_rawDescGZIP(), []int{27}
} }
func (x *WriteRes) GetFailedUserid() []string { func (x *WriteRes) GetFailedUserid() []string {
@@ -2403,7 +2511,7 @@ type ValueItem struct {
func (x *ValueItem) Reset() { func (x *ValueItem) Reset() {
*x = ValueItem{} *x = ValueItem{}
mi := &file_cmd_proto_msgTypes[27] mi := &file_cmd_proto_msgTypes[28]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -2415,7 +2523,7 @@ func (x *ValueItem) String() string {
func (*ValueItem) ProtoMessage() {} func (*ValueItem) ProtoMessage() {}
func (x *ValueItem) ProtoReflect() protoreflect.Message { func (x *ValueItem) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[27] mi := &file_cmd_proto_msgTypes[28]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -2428,7 +2536,7 @@ func (x *ValueItem) ProtoReflect() protoreflect.Message {
// Deprecated: Use ValueItem.ProtoReflect.Descriptor instead. // Deprecated: Use ValueItem.ProtoReflect.Descriptor instead.
func (*ValueItem) Descriptor() ([]byte, []int) { func (*ValueItem) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{27} return file_cmd_proto_rawDescGZIP(), []int{28}
} }
func (x *ValueItem) GetCmdIndex() uint32 { func (x *ValueItem) GetCmdIndex() uint32 {
@@ -2483,7 +2591,7 @@ type TaskListRes struct {
func (x *TaskListRes) Reset() { func (x *TaskListRes) Reset() {
*x = TaskListRes{} *x = TaskListRes{}
mi := &file_cmd_proto_msgTypes[28] mi := &file_cmd_proto_msgTypes[29]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -2495,7 +2603,7 @@ func (x *TaskListRes) String() string {
func (*TaskListRes) ProtoMessage() {} func (*TaskListRes) ProtoMessage() {}
func (x *TaskListRes) ProtoReflect() protoreflect.Message { func (x *TaskListRes) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[28] mi := &file_cmd_proto_msgTypes[29]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -2508,7 +2616,7 @@ func (x *TaskListRes) ProtoReflect() protoreflect.Message {
// Deprecated: Use TaskListRes.ProtoReflect.Descriptor instead. // Deprecated: Use TaskListRes.ProtoReflect.Descriptor instead.
func (*TaskListRes) Descriptor() ([]byte, []int) { func (*TaskListRes) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{28} return file_cmd_proto_rawDescGZIP(), []int{29}
} }
func (x *TaskListRes) GetTasks() []*Task { func (x *TaskListRes) GetTasks() []*Task {
@@ -2528,7 +2636,7 @@ type TargetListRes struct {
func (x *TargetListRes) Reset() { func (x *TargetListRes) Reset() {
*x = TargetListRes{} *x = TargetListRes{}
mi := &file_cmd_proto_msgTypes[29] mi := &file_cmd_proto_msgTypes[30]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -2540,7 +2648,7 @@ func (x *TargetListRes) String() string {
func (*TargetListRes) ProtoMessage() {} func (*TargetListRes) ProtoMessage() {}
func (x *TargetListRes) ProtoReflect() protoreflect.Message { func (x *TargetListRes) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[29] mi := &file_cmd_proto_msgTypes[30]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -2553,7 +2661,7 @@ func (x *TargetListRes) ProtoReflect() protoreflect.Message {
// Deprecated: Use TargetListRes.ProtoReflect.Descriptor instead. // Deprecated: Use TargetListRes.ProtoReflect.Descriptor instead.
func (*TargetListRes) Descriptor() ([]byte, []int) { func (*TargetListRes) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{29} return file_cmd_proto_rawDescGZIP(), []int{30}
} }
func (x *TargetListRes) GetTargetList() map[string]*Binds { func (x *TargetListRes) GetTargetList() map[string]*Binds {
@@ -2572,7 +2680,7 @@ type Binds struct {
func (x *Binds) Reset() { func (x *Binds) Reset() {
*x = Binds{} *x = Binds{}
mi := &file_cmd_proto_msgTypes[30] mi := &file_cmd_proto_msgTypes[31]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -2584,7 +2692,7 @@ func (x *Binds) String() string {
func (*Binds) ProtoMessage() {} func (*Binds) ProtoMessage() {}
func (x *Binds) ProtoReflect() protoreflect.Message { func (x *Binds) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[30] mi := &file_cmd_proto_msgTypes[31]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -2597,7 +2705,7 @@ func (x *Binds) ProtoReflect() protoreflect.Message {
// Deprecated: Use Binds.ProtoReflect.Descriptor instead. // Deprecated: Use Binds.ProtoReflect.Descriptor instead.
func (*Binds) Descriptor() ([]byte, []int) { func (*Binds) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{30} return file_cmd_proto_rawDescGZIP(), []int{31}
} }
func (x *Binds) GetBinds() []*Bind { func (x *Binds) GetBinds() []*Bind {
@@ -2621,7 +2729,7 @@ type Bind struct {
func (x *Bind) Reset() { func (x *Bind) Reset() {
*x = Bind{} *x = Bind{}
mi := &file_cmd_proto_msgTypes[31] mi := &file_cmd_proto_msgTypes[32]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -2633,7 +2741,7 @@ func (x *Bind) String() string {
func (*Bind) ProtoMessage() {} func (*Bind) ProtoMessage() {}
func (x *Bind) ProtoReflect() protoreflect.Message { func (x *Bind) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[31] mi := &file_cmd_proto_msgTypes[32]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -2646,7 +2754,7 @@ func (x *Bind) ProtoReflect() protoreflect.Message {
// Deprecated: Use Bind.ProtoReflect.Descriptor instead. // Deprecated: Use Bind.ProtoReflect.Descriptor instead.
func (*Bind) Descriptor() ([]byte, []int) { func (*Bind) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{31} return file_cmd_proto_rawDescGZIP(), []int{32}
} }
func (x *Bind) GetBindId() int64 { func (x *Bind) GetBindId() int64 {
@@ -2696,7 +2804,7 @@ type BindSetRes struct {
func (x *BindSetRes) Reset() { func (x *BindSetRes) Reset() {
*x = BindSetRes{} *x = BindSetRes{}
mi := &file_cmd_proto_msgTypes[32] mi := &file_cmd_proto_msgTypes[33]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -2708,7 +2816,7 @@ func (x *BindSetRes) String() string {
func (*BindSetRes) ProtoMessage() {} func (*BindSetRes) ProtoMessage() {}
func (x *BindSetRes) ProtoReflect() protoreflect.Message { func (x *BindSetRes) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[32] mi := &file_cmd_proto_msgTypes[33]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -2721,7 +2829,7 @@ func (x *BindSetRes) ProtoReflect() protoreflect.Message {
// Deprecated: Use BindSetRes.ProtoReflect.Descriptor instead. // Deprecated: Use BindSetRes.ProtoReflect.Descriptor instead.
func (*BindSetRes) Descriptor() ([]byte, []int) { func (*BindSetRes) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{32} return file_cmd_proto_rawDescGZIP(), []int{33}
} }
func (x *BindSetRes) GetSuccessNum() int32 { func (x *BindSetRes) GetSuccessNum() int32 {
@@ -2757,7 +2865,7 @@ type BindDeleteRes struct {
func (x *BindDeleteRes) Reset() { func (x *BindDeleteRes) Reset() {
*x = BindDeleteRes{} *x = BindDeleteRes{}
mi := &file_cmd_proto_msgTypes[33] mi := &file_cmd_proto_msgTypes[34]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -2769,7 +2877,7 @@ func (x *BindDeleteRes) String() string {
func (*BindDeleteRes) ProtoMessage() {} func (*BindDeleteRes) ProtoMessage() {}
func (x *BindDeleteRes) ProtoReflect() protoreflect.Message { func (x *BindDeleteRes) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[33] mi := &file_cmd_proto_msgTypes[34]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -2782,7 +2890,7 @@ func (x *BindDeleteRes) ProtoReflect() protoreflect.Message {
// Deprecated: Use BindDeleteRes.ProtoReflect.Descriptor instead. // Deprecated: Use BindDeleteRes.ProtoReflect.Descriptor instead.
func (*BindDeleteRes) Descriptor() ([]byte, []int) { func (*BindDeleteRes) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{33} return file_cmd_proto_rawDescGZIP(), []int{34}
} }
func (x *BindDeleteRes) GetSuccessNum() int32 { func (x *BindDeleteRes) GetSuccessNum() int32 {
@@ -2818,7 +2926,7 @@ type BindError struct {
func (x *BindError) Reset() { func (x *BindError) Reset() {
*x = BindError{} *x = BindError{}
mi := &file_cmd_proto_msgTypes[34] mi := &file_cmd_proto_msgTypes[35]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -2830,7 +2938,7 @@ func (x *BindError) String() string {
func (*BindError) ProtoMessage() {} func (*BindError) ProtoMessage() {}
func (x *BindError) ProtoReflect() protoreflect.Message { func (x *BindError) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[34] mi := &file_cmd_proto_msgTypes[35]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -2843,7 +2951,7 @@ func (x *BindError) ProtoReflect() protoreflect.Message {
// Deprecated: Use BindError.ProtoReflect.Descriptor instead. // Deprecated: Use BindError.ProtoReflect.Descriptor instead.
func (*BindError) Descriptor() ([]byte, []int) { func (*BindError) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{34} return file_cmd_proto_rawDescGZIP(), []int{35}
} }
func (x *BindError) GetBindId() int64 { func (x *BindError) GetBindId() int64 {
@@ -2880,7 +2988,7 @@ type ScriptRunRes struct {
func (x *ScriptRunRes) Reset() { func (x *ScriptRunRes) Reset() {
*x = ScriptRunRes{} *x = ScriptRunRes{}
mi := &file_cmd_proto_msgTypes[35] mi := &file_cmd_proto_msgTypes[36]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -2892,7 +3000,7 @@ func (x *ScriptRunRes) String() string {
func (*ScriptRunRes) ProtoMessage() {} func (*ScriptRunRes) ProtoMessage() {}
func (x *ScriptRunRes) ProtoReflect() protoreflect.Message { func (x *ScriptRunRes) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[35] mi := &file_cmd_proto_msgTypes[36]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -2905,7 +3013,7 @@ func (x *ScriptRunRes) ProtoReflect() protoreflect.Message {
// Deprecated: Use ScriptRunRes.ProtoReflect.Descriptor instead. // Deprecated: Use ScriptRunRes.ProtoReflect.Descriptor instead.
func (*ScriptRunRes) Descriptor() ([]byte, []int) { func (*ScriptRunRes) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{35} return file_cmd_proto_rawDescGZIP(), []int{36}
} }
func (x *ScriptRunRes) GetPrintOutput() string { func (x *ScriptRunRes) GetPrintOutput() string {
@@ -2945,7 +3053,7 @@ type ScriptUpdateRes struct {
func (x *ScriptUpdateRes) Reset() { func (x *ScriptUpdateRes) Reset() {
*x = ScriptUpdateRes{} *x = ScriptUpdateRes{}
mi := &file_cmd_proto_msgTypes[36] mi := &file_cmd_proto_msgTypes[37]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi) ms.StoreMessageInfo(mi)
} }
@@ -2957,7 +3065,7 @@ func (x *ScriptUpdateRes) String() string {
func (*ScriptUpdateRes) ProtoMessage() {} func (*ScriptUpdateRes) ProtoMessage() {}
func (x *ScriptUpdateRes) ProtoReflect() protoreflect.Message { func (x *ScriptUpdateRes) ProtoReflect() protoreflect.Message {
mi := &file_cmd_proto_msgTypes[36] mi := &file_cmd_proto_msgTypes[37]
if x != nil { if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil { if ms.LoadMessageInfo() == nil {
@@ -2970,7 +3078,7 @@ func (x *ScriptUpdateRes) ProtoReflect() protoreflect.Message {
// Deprecated: Use ScriptUpdateRes.ProtoReflect.Descriptor instead. // Deprecated: Use ScriptUpdateRes.ProtoReflect.Descriptor instead.
func (*ScriptUpdateRes) Descriptor() ([]byte, []int) { func (*ScriptUpdateRes) Descriptor() ([]byte, []int) {
return file_cmd_proto_rawDescGZIP(), []int{36} return file_cmd_proto_rawDescGZIP(), []int{37}
} }
var File_cmd_proto protoreflect.FileDescriptor var File_cmd_proto protoreflect.FileDescriptor
@@ -3019,11 +3127,11 @@ const file_cmd_proto_rawDesc = "" +
"\vwrite_bytes\x18\x02 \x01(\v2\x0e.saasapi.BytesR\n" + "\vwrite_bytes\x18\x02 \x01(\v2\x0e.saasapi.BytesR\n" +
"writeBytes\x125\n" + "writeBytes\x125\n" +
"\rwrite_uint32s\x18\x03 \x01(\v2\x10.saasapi.Uint32sR\fwriteUint32s\x12O\n" + "\rwrite_uint32s\x18\x03 \x01(\v2\x10.saasapi.Uint32sR\fwriteUint32s\x12O\n" +
"\x17write_flags_with_expire\x18\x04 \x01(\v2\x18.saasapi.FlagsWithExpireR\x14writeFlagsWithExpire\"O\n" + "\x17write_flags_with_expire\x18\x04 \x01(\v2\x18.saasapi.FlagsWithExpireR\x14writeFlagsWithExpire\"S\n" +
"\x05Bytes\x12\x14\n" + "\x05Bytes\x12\x14\n" +
"\x05bytes\x18\x01 \x01(\fR\x05bytes\x12\x17\n" + "\x05bytes\x18\x01 \x01(\fR\x05bytes\x12\x17\n" +
"\aindex_1\x18\x02 \x01(\x04R\x06index1\x12\x17\n" + "\aindex_1\x18\x02 \x01(\x04R\x06index1\x12\x1b\n" +
"\aindex_2\x18\x03 \x01(\x04R\x06index2\"<\n" + "\aindex_2\x18\x03 \x01(\x04B\x02\x18\x01R\x06index2\"<\n" +
"\aUint32s\x12\x18\n" + "\aUint32s\x12\x18\n" +
"\auint32s\x18\x01 \x03(\rR\auint32s\x12\x17\n" + "\auint32s\x18\x01 \x03(\rR\auint32s\x12\x17\n" +
"\aindex_1\x18\x02 \x01(\x04R\x06index1\"o\n" + "\aindex_1\x18\x02 \x01(\x04R\x06index1\"o\n" +
@@ -3117,9 +3225,12 @@ const file_cmd_proto_rawDesc = "" +
"\x0fbind_delete_res\x18> \x01(\v2\x16.saasapi.BindDeleteResH\x00R\rbindDeleteRes\x12=\n" + "\x0fbind_delete_res\x18> \x01(\v2\x16.saasapi.BindDeleteResH\x00R\rbindDeleteRes\x12=\n" +
"\x0escript_run_res\x18Z \x01(\v2\x15.saasapi.ScriptRunResH\x00R\fscriptRunRes\x12F\n" + "\x0escript_run_res\x18Z \x01(\v2\x15.saasapi.ScriptRunResH\x00R\fscriptRunRes\x12F\n" +
"\x11script_update_res\x18[ \x01(\v2\x18.saasapi.ScriptUpdateResH\x00R\x0fscriptUpdateResB\x05\n" + "\x11script_update_res\x18[ \x01(\v2\x18.saasapi.ScriptUpdateResH\x00R\x0fscriptUpdateResB\x05\n" +
"\x03res\"I\n" + "\x03res\"1\n" +
"\aInfoRes\x12!\n" + "\tDataSpace\x12\x10\n" +
"\fdataspace_id\x18\x01 \x03(\tR\vdataspaceId\x12\x1b\n" + "\x03did\x18\x01 \x03(\tR\x03did\x12\x12\n" +
"\x04wuid\x18\x02 \x03(\tR\x04wuid\"X\n" +
"\aInfoRes\x120\n" +
"\tdataspace\x18\x01 \x01(\v2\x12.saasapi.DataSpaceR\tdataspace\x12\x1b\n" +
"\ttarget_id\x18\x02 \x03(\tR\btargetId\"\x82\x01\n" + "\ttarget_id\x18\x02 \x03(\tR\btargetId\"\x82\x01\n" +
"\aReadRes\x12$\n" + "\aReadRes\x12$\n" +
"\x0esucc_cmd_count\x18\x01 \x01(\rR\fsuccCmdCount\x12$\n" + "\x0esucc_cmd_count\x18\x01 \x01(\rR\fsuccCmdCount\x12$\n" +
@@ -3224,11 +3335,17 @@ const file_cmd_proto_rawDesc = "" +
"\aSUCCESS\x10\x04\x12\b\n" + "\aSUCCESS\x10\x04\x12\b\n" +
"\x04FAIL\x10\x05\x12\v\n" + "\x04FAIL\x10\x05\x12\v\n" +
"\aDELETED\x10\n" + "\aDELETED\x10\n" +
"*'\n" + "**\n" +
"\x02OS\x12\v\n" + "\x02OS\x12\x0e\n" +
"\aUNKNOWN\x10\x00\x12\a\n" + "\n" +
"OS_UNKNOWN\x10\x00\x12\a\n" +
"\x03IOS\x10\x01\x12\v\n" + "\x03IOS\x10\x01\x12\v\n" +
"\aANDROID\x10\x02B Z\x1egit.algo.com.cn/public/saasapib\x06proto3" "\aANDROID\x10\x02*1\n" +
"\x03MAX\x12\x0f\n" +
"\vMAX_UNKNOWN\x10\x00\x12\x06\n" +
"\x02U8\x10@\x12\a\n" +
"\x03U32\x10\b\x12\b\n" +
"\x04FLAG\x10\x04B Z\x1egit.algo.com.cn/public/saasapib\x06proto3"
var ( var (
file_cmd_proto_rawDescOnce sync.Once file_cmd_proto_rawDescOnce sync.Once
@@ -3242,8 +3359,8 @@ func file_cmd_proto_rawDescGZIP() []byte {
return file_cmd_proto_rawDescData return file_cmd_proto_rawDescData
} }
var file_cmd_proto_enumTypes = make([]protoimpl.EnumInfo, 6) var file_cmd_proto_enumTypes = make([]protoimpl.EnumInfo, 7)
var file_cmd_proto_msgTypes = make([]protoimpl.MessageInfo, 38) var file_cmd_proto_msgTypes = make([]protoimpl.MessageInfo, 39)
var file_cmd_proto_goTypes = []any{ var file_cmd_proto_goTypes = []any{
(BindType)(0), // 0: saasapi.BindType (BindType)(0), // 0: saasapi.BindType
(BindSourceType)(0), // 1: saasapi.BindSourceType (BindSourceType)(0), // 1: saasapi.BindSourceType
@@ -3251,106 +3368,109 @@ var file_cmd_proto_goTypes = []any{
(CmdErrorCode)(0), // 3: saasapi.CmdErrorCode (CmdErrorCode)(0), // 3: saasapi.CmdErrorCode
(TaskStatus)(0), // 4: saasapi.TaskStatus (TaskStatus)(0), // 4: saasapi.TaskStatus
(OS)(0), // 5: saasapi.OS (OS)(0), // 5: saasapi.OS
(*SaasReq)(nil), // 6: saasapi.SaasReq (MAX)(0), // 6: saasapi.MAX
(*Info)(nil), // 7: saasapi.Info (*SaasReq)(nil), // 7: saasapi.SaasReq
(*Read)(nil), // 8: saasapi.Read (*Info)(nil), // 8: saasapi.Info
(*ReadItem)(nil), // 9: saasapi.ReadItem (*Read)(nil), // 9: saasapi.Read
(*Write)(nil), // 10: saasapi.Write (*ReadItem)(nil), // 10: saasapi.ReadItem
(*WriteItem)(nil), // 11: saasapi.WriteItem (*Write)(nil), // 11: saasapi.Write
(*Bytes)(nil), // 12: saasapi.Bytes (*WriteItem)(nil), // 12: saasapi.WriteItem
(*Uint32S)(nil), // 13: saasapi.Uint32s (*Bytes)(nil), // 13: saasapi.Bytes
(*FlagsWithExpire)(nil), // 14: saasapi.FlagsWithExpire (*Uint32S)(nil), // 14: saasapi.Uint32s
(*FlagWithExpire)(nil), // 15: saasapi.FlagWithExpire (*FlagsWithExpire)(nil), // 15: saasapi.FlagsWithExpire
(*ColumnWrite)(nil), // 16: saasapi.ColumnWrite (*FlagWithExpire)(nil), // 16: saasapi.FlagWithExpire
(*Task)(nil), // 17: saasapi.Task (*ColumnWrite)(nil), // 17: saasapi.ColumnWrite
(*TaskList)(nil), // 18: saasapi.TaskList (*Task)(nil), // 18: saasapi.Task
(*TaskRun)(nil), // 19: saasapi.TaskRun (*TaskList)(nil), // 19: saasapi.TaskList
(*TaskDelete)(nil), // 20: saasapi.TaskDelete (*TaskRun)(nil), // 20: saasapi.TaskRun
(*TaskInfo)(nil), // 21: saasapi.TaskInfo (*TaskDelete)(nil), // 21: saasapi.TaskDelete
(*FileInfo)(nil), // 22: saasapi.FileInfo (*TaskInfo)(nil), // 22: saasapi.TaskInfo
(*FileBlock)(nil), // 23: saasapi.FileBlock (*FileInfo)(nil), // 23: saasapi.FileInfo
(*TargetList)(nil), // 24: saasapi.TargetList (*FileBlock)(nil), // 24: saasapi.FileBlock
(*BindSet)(nil), // 25: saasapi.BindSet (*TargetList)(nil), // 25: saasapi.TargetList
(*BindDelete)(nil), // 26: saasapi.BindDelete (*BindSet)(nil), // 26: saasapi.BindSet
(*ScriptRun)(nil), // 27: saasapi.ScriptRun (*BindDelete)(nil), // 27: saasapi.BindDelete
(*ScriptUpdate)(nil), // 28: saasapi.ScriptUpdate (*ScriptRun)(nil), // 28: saasapi.ScriptRun
(*SaasRes)(nil), // 29: saasapi.SaasRes (*ScriptUpdate)(nil), // 29: saasapi.ScriptUpdate
(*InfoRes)(nil), // 30: saasapi.InfoRes (*SaasRes)(nil), // 30: saasapi.SaasRes
(*ReadRes)(nil), // 31: saasapi.ReadRes (*DataSpace)(nil), // 31: saasapi.DataSpace
(*WriteRes)(nil), // 32: saasapi.WriteRes (*InfoRes)(nil), // 32: saasapi.InfoRes
(*ValueItem)(nil), // 33: saasapi.ValueItem (*ReadRes)(nil), // 33: saasapi.ReadRes
(*TaskListRes)(nil), // 34: saasapi.TaskListRes (*WriteRes)(nil), // 34: saasapi.WriteRes
(*TargetListRes)(nil), // 35: saasapi.TargetListRes (*ValueItem)(nil), // 35: saasapi.ValueItem
(*Binds)(nil), // 36: saasapi.Binds (*TaskListRes)(nil), // 36: saasapi.TaskListRes
(*Bind)(nil), // 37: saasapi.Bind (*TargetListRes)(nil), // 37: saasapi.TargetListRes
(*BindSetRes)(nil), // 38: saasapi.BindSetRes (*Binds)(nil), // 38: saasapi.Binds
(*BindDeleteRes)(nil), // 39: saasapi.BindDeleteRes (*Bind)(nil), // 39: saasapi.Bind
(*BindError)(nil), // 40: saasapi.BindError (*BindSetRes)(nil), // 40: saasapi.BindSetRes
(*ScriptRunRes)(nil), // 41: saasapi.ScriptRunRes (*BindDeleteRes)(nil), // 41: saasapi.BindDeleteRes
(*ScriptUpdateRes)(nil), // 42: saasapi.ScriptUpdateRes (*BindError)(nil), // 42: saasapi.BindError
nil, // 43: saasapi.TargetListRes.TargetListEntry (*ScriptRunRes)(nil), // 43: saasapi.ScriptRunRes
(*ScriptUpdateRes)(nil), // 44: saasapi.ScriptUpdateRes
nil, // 45: saasapi.TargetListRes.TargetListEntry
} }
var file_cmd_proto_depIdxs = []int32{ var file_cmd_proto_depIdxs = []int32{
7, // 0: saasapi.SaasReq.info:type_name -> saasapi.Info 8, // 0: saasapi.SaasReq.info:type_name -> saasapi.Info
8, // 1: saasapi.SaasReq.read:type_name -> saasapi.Read 9, // 1: saasapi.SaasReq.read:type_name -> saasapi.Read
10, // 2: saasapi.SaasReq.write:type_name -> saasapi.Write 11, // 2: saasapi.SaasReq.write:type_name -> saasapi.Write
16, // 3: saasapi.SaasReq.column_write:type_name -> saasapi.ColumnWrite 17, // 3: saasapi.SaasReq.column_write:type_name -> saasapi.ColumnWrite
17, // 4: saasapi.SaasReq.task_create:type_name -> saasapi.Task 18, // 4: saasapi.SaasReq.task_create:type_name -> saasapi.Task
18, // 5: saasapi.SaasReq.task_list:type_name -> saasapi.TaskList 19, // 5: saasapi.SaasReq.task_list:type_name -> saasapi.TaskList
19, // 6: saasapi.SaasReq.task_run:type_name -> saasapi.TaskRun 20, // 6: saasapi.SaasReq.task_run:type_name -> saasapi.TaskRun
20, // 7: saasapi.SaasReq.task_delete:type_name -> saasapi.TaskDelete 21, // 7: saasapi.SaasReq.task_delete:type_name -> saasapi.TaskDelete
21, // 8: saasapi.SaasReq.task_info:type_name -> saasapi.TaskInfo 22, // 8: saasapi.SaasReq.task_info:type_name -> saasapi.TaskInfo
24, // 9: saasapi.SaasReq.target_list:type_name -> saasapi.TargetList 25, // 9: saasapi.SaasReq.target_list:type_name -> saasapi.TargetList
25, // 10: saasapi.SaasReq.bind_set:type_name -> saasapi.BindSet 26, // 10: saasapi.SaasReq.bind_set:type_name -> saasapi.BindSet
26, // 11: saasapi.SaasReq.bind_delete:type_name -> saasapi.BindDelete 27, // 11: saasapi.SaasReq.bind_delete:type_name -> saasapi.BindDelete
27, // 12: saasapi.SaasReq.script_run:type_name -> saasapi.ScriptRun 28, // 12: saasapi.SaasReq.script_run:type_name -> saasapi.ScriptRun
28, // 13: saasapi.SaasReq.script_update:type_name -> saasapi.ScriptUpdate 29, // 13: saasapi.SaasReq.script_update:type_name -> saasapi.ScriptUpdate
9, // 14: saasapi.Read.read_items:type_name -> saasapi.ReadItem 10, // 14: saasapi.Read.read_items:type_name -> saasapi.ReadItem
11, // 15: saasapi.Write.write_items:type_name -> saasapi.WriteItem 12, // 15: saasapi.Write.write_items:type_name -> saasapi.WriteItem
12, // 16: saasapi.WriteItem.write_bytes:type_name -> saasapi.Bytes 13, // 16: saasapi.WriteItem.write_bytes:type_name -> saasapi.Bytes
13, // 17: saasapi.WriteItem.write_uint32s:type_name -> saasapi.Uint32s 14, // 17: saasapi.WriteItem.write_uint32s:type_name -> saasapi.Uint32s
14, // 18: saasapi.WriteItem.write_flags_with_expire:type_name -> saasapi.FlagsWithExpire 15, // 18: saasapi.WriteItem.write_flags_with_expire:type_name -> saasapi.FlagsWithExpire
15, // 19: saasapi.FlagsWithExpire.flags_with_expire:type_name -> saasapi.FlagWithExpire 16, // 19: saasapi.FlagsWithExpire.flags_with_expire:type_name -> saasapi.FlagWithExpire
12, // 20: saasapi.ColumnWrite.write_bytes:type_name -> saasapi.Bytes 13, // 20: saasapi.ColumnWrite.write_bytes:type_name -> saasapi.Bytes
13, // 21: saasapi.ColumnWrite.write_uint32s:type_name -> saasapi.Uint32s 14, // 21: saasapi.ColumnWrite.write_uint32s:type_name -> saasapi.Uint32s
14, // 22: saasapi.ColumnWrite.write_flags_with_expire:type_name -> saasapi.FlagsWithExpire 15, // 22: saasapi.ColumnWrite.write_flags_with_expire:type_name -> saasapi.FlagsWithExpire
22, // 23: saasapi.Task.task_file_infos:type_name -> saasapi.FileInfo 23, // 23: saasapi.Task.task_file_infos:type_name -> saasapi.FileInfo
4, // 24: saasapi.Task.status:type_name -> saasapi.TaskStatus 4, // 24: saasapi.Task.status:type_name -> saasapi.TaskStatus
4, // 25: saasapi.TaskList.status_filter:type_name -> saasapi.TaskStatus 4, // 25: saasapi.TaskList.status_filter:type_name -> saasapi.TaskStatus
23, // 26: saasapi.FileInfo.file_blocks:type_name -> saasapi.FileBlock 24, // 26: saasapi.FileInfo.file_blocks:type_name -> saasapi.FileBlock
37, // 27: saasapi.BindSet.binds:type_name -> saasapi.Bind 39, // 27: saasapi.BindSet.binds:type_name -> saasapi.Bind
37, // 28: saasapi.BindDelete.binds:type_name -> saasapi.Bind 39, // 28: saasapi.BindDelete.binds:type_name -> saasapi.Bind
5, // 29: saasapi.ScriptRun.os:type_name -> saasapi.OS 5, // 29: saasapi.ScriptRun.os:type_name -> saasapi.OS
2, // 30: saasapi.SaasRes.code:type_name -> saasapi.ErrorCode 2, // 30: saasapi.SaasRes.code:type_name -> saasapi.ErrorCode
30, // 31: saasapi.SaasRes.info_res:type_name -> saasapi.InfoRes 32, // 31: saasapi.SaasRes.info_res:type_name -> saasapi.InfoRes
31, // 32: saasapi.SaasRes.read_res:type_name -> saasapi.ReadRes 33, // 32: saasapi.SaasRes.read_res:type_name -> saasapi.ReadRes
32, // 33: saasapi.SaasRes.write_res:type_name -> saasapi.WriteRes 34, // 33: saasapi.SaasRes.write_res:type_name -> saasapi.WriteRes
17, // 34: saasapi.SaasRes.task_create_res:type_name -> saasapi.Task 18, // 34: saasapi.SaasRes.task_create_res:type_name -> saasapi.Task
34, // 35: saasapi.SaasRes.task_list_res:type_name -> saasapi.TaskListRes 36, // 35: saasapi.SaasRes.task_list_res:type_name -> saasapi.TaskListRes
17, // 36: saasapi.SaasRes.task_run_res:type_name -> saasapi.Task 18, // 36: saasapi.SaasRes.task_run_res:type_name -> saasapi.Task
17, // 37: saasapi.SaasRes.task_delete_res:type_name -> saasapi.Task 18, // 37: saasapi.SaasRes.task_delete_res:type_name -> saasapi.Task
17, // 38: saasapi.SaasRes.task_info_res:type_name -> saasapi.Task 18, // 38: saasapi.SaasRes.task_info_res:type_name -> saasapi.Task
35, // 39: saasapi.SaasRes.target_list_res:type_name -> saasapi.TargetListRes 37, // 39: saasapi.SaasRes.target_list_res:type_name -> saasapi.TargetListRes
38, // 40: saasapi.SaasRes.bind_set_res:type_name -> saasapi.BindSetRes 40, // 40: saasapi.SaasRes.bind_set_res:type_name -> saasapi.BindSetRes
39, // 41: saasapi.SaasRes.bind_delete_res:type_name -> saasapi.BindDeleteRes 41, // 41: saasapi.SaasRes.bind_delete_res:type_name -> saasapi.BindDeleteRes
41, // 42: saasapi.SaasRes.script_run_res:type_name -> saasapi.ScriptRunRes 43, // 42: saasapi.SaasRes.script_run_res:type_name -> saasapi.ScriptRunRes
42, // 43: saasapi.SaasRes.script_update_res:type_name -> saasapi.ScriptUpdateRes 44, // 43: saasapi.SaasRes.script_update_res:type_name -> saasapi.ScriptUpdateRes
33, // 44: saasapi.ReadRes.cmd_res:type_name -> saasapi.ValueItem 31, // 44: saasapi.InfoRes.dataspace:type_name -> saasapi.DataSpace
3, // 45: saasapi.ValueItem.cmd_code:type_name -> saasapi.CmdErrorCode 35, // 45: saasapi.ReadRes.cmd_res:type_name -> saasapi.ValueItem
15, // 46: saasapi.ValueItem.flags_with_expire:type_name -> saasapi.FlagWithExpire 3, // 46: saasapi.ValueItem.cmd_code:type_name -> saasapi.CmdErrorCode
17, // 47: saasapi.TaskListRes.tasks:type_name -> saasapi.Task 16, // 47: saasapi.ValueItem.flags_with_expire:type_name -> saasapi.FlagWithExpire
43, // 48: saasapi.TargetListRes.target_list:type_name -> saasapi.TargetListRes.TargetListEntry 18, // 48: saasapi.TaskListRes.tasks:type_name -> saasapi.Task
37, // 49: saasapi.Binds.binds:type_name -> saasapi.Bind 45, // 49: saasapi.TargetListRes.target_list:type_name -> saasapi.TargetListRes.TargetListEntry
0, // 50: saasapi.Bind.bind_type:type_name -> saasapi.BindType 39, // 50: saasapi.Binds.binds:type_name -> saasapi.Bind
1, // 51: saasapi.Bind.bind_source:type_name -> saasapi.BindSourceType 0, // 51: saasapi.Bind.bind_type:type_name -> saasapi.BindType
40, // 52: saasapi.BindSetRes.errors:type_name -> saasapi.BindError 1, // 52: saasapi.Bind.bind_source:type_name -> saasapi.BindSourceType
40, // 53: saasapi.BindDeleteRes.errors:type_name -> saasapi.BindError 42, // 53: saasapi.BindSetRes.errors:type_name -> saasapi.BindError
36, // 54: saasapi.TargetListRes.TargetListEntry.value:type_name -> saasapi.Binds 42, // 54: saasapi.BindDeleteRes.errors:type_name -> saasapi.BindError
55, // [55:55] is the sub-list for method output_type 38, // 55: saasapi.TargetListRes.TargetListEntry.value:type_name -> saasapi.Binds
55, // [55:55] is the sub-list for method input_type 56, // [56:56] is the sub-list for method output_type
55, // [55:55] is the sub-list for extension type_name 56, // [56:56] is the sub-list for method input_type
55, // [55:55] is the sub-list for extension extendee 56, // [56:56] is the sub-list for extension type_name
0, // [0:55] is the sub-list for field type_name 56, // [56:56] is the sub-list for extension extendee
0, // [0:56] is the sub-list for field type_name
} }
func init() { file_cmd_proto_init() } func init() { file_cmd_proto_init() }
@@ -3394,8 +3514,8 @@ func file_cmd_proto_init() {
File: protoimpl.DescBuilder{ File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_cmd_proto_rawDesc), len(file_cmd_proto_rawDesc)), RawDescriptor: unsafe.Slice(unsafe.StringData(file_cmd_proto_rawDesc), len(file_cmd_proto_rawDesc)),
NumEnums: 6, NumEnums: 7,
NumMessages: 38, NumMessages: 39,
NumExtensions: 0, NumExtensions: 0,
NumServices: 0, NumServices: 0,
}, },

View File

@@ -66,20 +66,20 @@ message WriteItem {
message Bytes { message Bytes {
bytes bytes = 1; // 写入的byte bytes bytes = 1; // 写入的byte
uint64 index_1 = 2; // 写入byte的索引值(0..63) uint64 index_1 = 2; // 写入byte的索引值(0..63)
uint64 index_2 = 3; // 写入byte的索引值(64..127) uint64 index_2 = 3 [deprecated=true]; // **已弃用 写入byte的索引值(64..127)
} }
// Uint32s 写入uint32区域 // Uint32s 写入uint32区域
message Uint32s { message Uint32s {
repeated uint32 uint32s = 1; // 写入的uint32 repeated uint32 uint32s = 1; // 写入的uint32
uint64 index_1 = 2; // 写入uint32的索引值(0..15) 最多 16 uint64 index_1 = 2; // 写入uint32的索引值(0..7) 最多 8
//uint64 index_2 = 3; // 写入uint32的索引值(当前不支持) //uint64 index_2 = 3; // 写入uint32的索引值(当前不支持)
} }
// FlagsWithExpire 写入标志位区域 // FlagsWithExpire 写入标志位区域
message FlagsWithExpire { message FlagsWithExpire {
repeated FlagWithExpire flags_with_expire = 1; // 写入的标志位 repeated FlagWithExpire flags_with_expire = 1; // 写入的标志位
uint64 index_1 = 2; // 写入标志位的索引值 uint64 index_1 = 2; // 写入标志位的索引值(0..3) 最多 4 个
} }
// FlagWithExpire 标志位 // FlagWithExpire 标志位
@@ -205,9 +205,14 @@ message SaasRes {
} }
} }
message DataSpace {
repeated string did = 1; // 设备ID区
repeated string wuid = 2; // OpenID区
}
// InfoRes 账号信息返回 // InfoRes 账号信息返回
message InfoRes { message InfoRes {
repeated string dataspace_id = 1; // 可用数据区列表 DataSpace dataspace = 1; // 可用数据区列表
repeated string target_id = 2; // 策略ID列表 repeated string target_id = 2; // 策略ID列表
} }
@@ -349,6 +354,7 @@ enum CmdErrorCode {
OK = 0; // 成功 OK = 0; // 成功
} }
// TaskStatus 任务状态
enum TaskStatus { enum TaskStatus {
ALL = 0; // 全部 ALL = 0; // 全部
WAITING = 1; // 等待中 WAITING = 1; // 等待中
@@ -361,8 +367,16 @@ enum TaskStatus {
} }
enum OS { enum OS {
UNKNOWN = 0; OS_UNKNOWN = 0;
IOS = 1; IOS = 1;
ANDROID = 2; ANDROID = 2;
} }
// MAX 最大限定
enum MAX {
MAX_UNKNOWN = 0;
U8 = 64;
U32 = 8;
FLAG = 4;
}

View File

@@ -236,11 +236,7 @@ func convertBatch(lines []string, convertParams convertParams, resultChan chan<-
saasWriteItem.WriteBytes = &saasapi.Bytes{} saasWriteItem.WriteBytes = &saasapi.Bytes{}
} }
saasWriteItem.WriteBytes.Bytes = append(saasWriteItem.WriteBytes.Bytes, *targetinfo.WriteByte) saasWriteItem.WriteBytes.Bytes = append(saasWriteItem.WriteBytes.Bytes, *targetinfo.WriteByte)
if targetinfo.WriteBytePos < 64 { saasWriteItem.WriteBytes.Index_1 |= 1 << targetinfo.WriteBytePos
saasWriteItem.WriteBytes.Index_1 |= 1 << targetinfo.WriteBytePos
} else if targetinfo.WriteBytePos < 128 {
saasWriteItem.WriteBytes.Index_2 |= 1 << (targetinfo.WriteBytePos - 64)
}
} }
if targetinfo.WriteUint32 != nil { if targetinfo.WriteUint32 != nil {

View File

@@ -0,0 +1,61 @@
package main
import (
"encoding/json"
"fmt"
"os"
"git.algo.com.cn/public/saasapi"
)
// MapConfig 配置
type MapConfig struct {
Targets map[string]*Target `json:"targets"`
}
// Target 配置
type Target struct {
WriteByte *byte `json:"write_byte"` // byte值
WriteBytePos uint32 `json:"write_byte_pos"` // byte写入位置
WriteUint32 *uint32 `json:"write_uint32"` // uint32值
WriteUint32Pos uint32 `json:"write_uint32_pos"` // uint32写入位置
WriteFlag *bool `json:"write_flag"` // 标志位
WriteExpire *uint32 `json:"write_expire"` // 过期时间
WriteFlagWithExpirePos uint32 `json:"write_flag_with_expire_pos"` // 标志与过期写入位置
}
// LoadConfigFile 加载配置文件
func LoadMapFile(filename string) (*MapConfig, error) {
// 打开文件
f, err := os.Open(filename)
if err != nil {
return nil, err
}
defer f.Close()
sc := &MapConfig{}
err = json.NewDecoder(f).Decode(sc)
if err != nil {
return nil, err
}
for targetName, targetInfo := range sc.Targets {
if targetInfo.WriteBytePos >= uint32(saasapi.MAX_U8) {
err = fmt.Errorf("%v WriteBytePos>MAX_U8 , current %v, MAX %v", targetName, targetInfo.WriteBytePos, uint32(saasapi.MAX_U8)-1)
break
}
if targetInfo.WriteUint32Pos >= uint32(saasapi.MAX_U32) {
err = fmt.Errorf("%v WriteUint32Pos>MAX_U32 , current %v, MAX %v", targetName, targetInfo.WriteUint32Pos, uint32(saasapi.MAX_U32)-1)
break
}
if targetInfo.WriteFlagWithExpirePos >= uint32(saasapi.MAX_FLAG) {
err = fmt.Errorf("%v WriteFlagWithExpirePos>MAX_FLAG , current %v, MAX %v", targetName, targetInfo.WriteFlagWithExpirePos, uint32(saasapi.MAX_FLAG)-1)
break
}
}
return sc, err
}

View File

@@ -1,38 +0,0 @@
package main
import (
"encoding/json"
"os"
)
// MapConfig 配置
type MapConfig struct {
Targets map[string]*Target `json:"targets"`
}
// Target 配置
type Target struct {
WriteByte *byte `json:"write_byte"` // byte值
WriteBytePos int `json:"write_byte_pos"` // byte写入位置
WriteUint32 *uint32 `json:"write_uint32"` // uint32值
WriteUint32Pos int `json:"write_uint32_pos"` // uint32写入位置
WriteFlag *bool `json:"write_flag"` // 标志位
WriteExpire *uint32 `json:"write_expire"` // 过期时间
WriteFlagWithExpirePos int `json:"write_flag_with_expire_pos"` // 标志与过期写入位置
}
// LoadConfigFile 加载配置文件
func LoadMapFile(filename string) (*MapConfig, error) {
// 打开文件
f, err := os.Open(filename)
if err != nil {
return nil, err
}
defer f.Close()
sc := &MapConfig{}
err = json.NewDecoder(f).Decode(sc)
return sc, err
}

View File

@@ -17,7 +17,7 @@ type infoTaskParams struct {
} }
func RunTaskInfo(args ...string) error { func RunTaskInfo(args ...string) error {
fs := flag.NewFlagSet("create", flag.ExitOnError) fs := flag.NewFlagSet("info", flag.ExitOnError)
cfgFile := paramConfig(fs) cfgFile := paramConfig(fs)
sha256 := paramSha256(fs) sha256 := paramSha256(fs)

View File

@@ -17,7 +17,7 @@ type listTaskParams struct {
} }
func RunTaskList(args ...string) error { func RunTaskList(args ...string) error {
fs := flag.NewFlagSet("create", flag.ExitOnError) fs := flag.NewFlagSet("list", flag.ExitOnError)
cfgFile := paramConfig(fs) cfgFile := paramConfig(fs)
filter := paramFilterStatus(fs) filter := paramFilterStatus(fs)

View File

@@ -17,7 +17,7 @@ type runTaskParams struct {
} }
func RunTaskRun(args ...string) error { func RunTaskRun(args ...string) error {
fs := flag.NewFlagSet("create", flag.ExitOnError) fs := flag.NewFlagSet("run", flag.ExitOnError)
cfgFile := paramConfig(fs) cfgFile := paramConfig(fs)
sha256 := paramSha256(fs) sha256 := paramSha256(fs)