From 1793e2c3d91ad35aa84360cb0e15fd00349e0c0f Mon Sep 17 00:00:00 2001 From: algotao Date: Mon, 31 Mar 2025 11:58:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=8D=8F=E8=AE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd.pb.go | 244 +++++++++++++++++++++++++--------------- proto/saascmd/cmd.proto | 34 +++--- 2 files changed, 175 insertions(+), 103 deletions(-) diff --git a/cmd.pb.go b/cmd.pb.go index f0e2830..f08bda7 100644 --- a/cmd.pb.go +++ b/cmd.pb.go @@ -69,29 +69,29 @@ func (UserIdType) EnumDescriptor() ([]byte, []int) { } // Cmds 批量命令 -type Cmds struct { +type SaasReq struct { state protoimpl.MessageState `protogen:"open.v1"` UseridType UserIdType `protobuf:"varint,1,opt,name=userid_type,json=useridType,proto3,enum=saasapi.UserIdType" json:"userid_type,omitempty"` // 用户ID类型 Appid string `protobuf:"bytes,2,opt,name=appid,proto3" json:"appid,omitempty"` // 小程序/小游戏/公众号/视频号的appid - Cmd []*Cmd `protobuf:"bytes,3,rep,name=cmd,proto3" json:"cmd,omitempty"` // 批量写入命令 + Cmds []*WriteCmd `protobuf:"bytes,3,rep,name=cmds,proto3" json:"cmds,omitempty"` // 批量写入命令 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *Cmds) Reset() { - *x = Cmds{} +func (x *SaasReq) Reset() { + *x = SaasReq{} mi := &file_cmd_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Cmds) String() string { +func (x *SaasReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Cmds) ProtoMessage() {} +func (*SaasReq) ProtoMessage() {} -func (x *Cmds) ProtoReflect() protoreflect.Message { +func (x *SaasReq) ProtoReflect() protoreflect.Message { mi := &file_cmd_proto_msgTypes[0] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -103,57 +103,58 @@ func (x *Cmds) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Cmds.ProtoReflect.Descriptor instead. -func (*Cmds) Descriptor() ([]byte, []int) { +// Deprecated: Use SaasReq.ProtoReflect.Descriptor instead. +func (*SaasReq) Descriptor() ([]byte, []int) { return file_cmd_proto_rawDescGZIP(), []int{0} } -func (x *Cmds) GetUseridType() UserIdType { +func (x *SaasReq) GetUseridType() UserIdType { if x != nil { return x.UseridType } return UserIdType_DeviceId } -func (x *Cmds) GetAppid() string { +func (x *SaasReq) GetAppid() string { if x != nil { return x.Appid } return "" } -func (x *Cmds) GetCmd() []*Cmd { +func (x *SaasReq) GetCmds() []*WriteCmd { if x != nil { - return x.Cmd + return x.Cmds } return nil } -// Cmd 上传命令 -type Cmd struct { +// WriteCmd 上传命令 +type WriteCmd struct { state protoimpl.MessageState `protogen:"open.v1"` Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid,omitempty"` // 用户ID WriteBytes *WriteBytes `protobuf:"bytes,2,opt,name=write_bytes,json=writeBytes,proto3" json:"write_bytes,omitempty"` // byte区域 WriteUint32S *WriteUint32S `protobuf:"bytes,3,opt,name=write_uint32s,json=writeUint32s,proto3" json:"write_uint32s,omitempty"` // uint32区域 WriteFlagsWithExpire *WriteFlagsWithExpire `protobuf:"bytes,4,opt,name=write_flags_with_expire,json=writeFlagsWithExpire,proto3" json:"write_flags_with_expire,omitempty"` // 标志位区域 + IsFullOverwrite bool `protobuf:"varint,5,opt,name=is_full_overwrite,json=isFullOverwrite,proto3" json:"is_full_overwrite,omitempty"` // 是否全量覆盖 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } -func (x *Cmd) Reset() { - *x = Cmd{} +func (x *WriteCmd) Reset() { + *x = WriteCmd{} mi := &file_cmd_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } -func (x *Cmd) String() string { +func (x *WriteCmd) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Cmd) ProtoMessage() {} +func (*WriteCmd) ProtoMessage() {} -func (x *Cmd) ProtoReflect() protoreflect.Message { +func (x *WriteCmd) ProtoReflect() protoreflect.Message { mi := &file_cmd_proto_msgTypes[1] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -165,45 +166,52 @@ func (x *Cmd) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Cmd.ProtoReflect.Descriptor instead. -func (*Cmd) Descriptor() ([]byte, []int) { +// Deprecated: Use WriteCmd.ProtoReflect.Descriptor instead. +func (*WriteCmd) Descriptor() ([]byte, []int) { return file_cmd_proto_rawDescGZIP(), []int{1} } -func (x *Cmd) GetUserid() string { +func (x *WriteCmd) GetUserid() string { if x != nil { return x.Userid } return "" } -func (x *Cmd) GetWriteBytes() *WriteBytes { +func (x *WriteCmd) GetWriteBytes() *WriteBytes { if x != nil { return x.WriteBytes } return nil } -func (x *Cmd) GetWriteUint32S() *WriteUint32S { +func (x *WriteCmd) GetWriteUint32S() *WriteUint32S { if x != nil { return x.WriteUint32S } return nil } -func (x *Cmd) GetWriteFlagsWithExpire() *WriteFlagsWithExpire { +func (x *WriteCmd) GetWriteFlagsWithExpire() *WriteFlagsWithExpire { if x != nil { return x.WriteFlagsWithExpire } return nil } +func (x *WriteCmd) GetIsFullOverwrite() bool { + if x != nil { + return x.IsFullOverwrite + } + return false +} + // WriteBytes 写入byte type WriteBytes struct { state protoimpl.MessageState `protogen:"open.v1"` - WriteBytes []byte `protobuf:"bytes,1,opt,name=write_bytes,json=writeBytes,proto3" json:"write_bytes,omitempty"` // 写入的byte - WriteIndex_1 uint64 `protobuf:"varint,2,opt,name=write_index_1,json=writeIndex1,proto3" json:"write_index_1,omitempty"` // 写入byte的索引值(0..63) - WriteIndex_2 uint64 `protobuf:"varint,3,opt,name=write_index_2,json=writeIndex2,proto3" json:"write_index_2,omitempty"` // 写入byte的索引值(64..127) + 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_2 uint64 `protobuf:"varint,3,opt,name=index_2,json=index2,proto3" json:"index_2,omitempty"` // 写入byte的索引值(64..127) unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -238,23 +246,23 @@ func (*WriteBytes) Descriptor() ([]byte, []int) { return file_cmd_proto_rawDescGZIP(), []int{2} } -func (x *WriteBytes) GetWriteBytes() []byte { +func (x *WriteBytes) GetBytes() []byte { if x != nil { - return x.WriteBytes + return x.Bytes } return nil } -func (x *WriteBytes) GetWriteIndex_1() uint64 { +func (x *WriteBytes) GetIndex_1() uint64 { if x != nil { - return x.WriteIndex_1 + return x.Index_1 } return 0 } -func (x *WriteBytes) GetWriteIndex_2() uint64 { +func (x *WriteBytes) GetIndex_2() uint64 { if x != nil { - return x.WriteIndex_2 + return x.Index_2 } return 0 } @@ -262,9 +270,8 @@ func (x *WriteBytes) GetWriteIndex_2() uint64 { // WriteUint32s 写入uint32 type WriteUint32S struct { state protoimpl.MessageState `protogen:"open.v1"` - WriteUint32S []uint32 `protobuf:"varint,1,rep,packed,name=write_uint32s,json=writeUint32s,proto3" json:"write_uint32s,omitempty"` // 写入的uint32 - WriteIndex_1 uint64 `protobuf:"varint,2,opt,name=write_index_1,json=writeIndex1,proto3" json:"write_index_1,omitempty"` // 写入uint32的索引值(0..63) - WriteIndex_2 uint64 `protobuf:"varint,3,opt,name=write_index_2,json=writeIndex2,proto3" json:"write_index_2,omitempty"` // 写入uint32的索引值(64..127) + 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..63) unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -299,34 +306,27 @@ func (*WriteUint32S) Descriptor() ([]byte, []int) { return file_cmd_proto_rawDescGZIP(), []int{3} } -func (x *WriteUint32S) GetWriteUint32S() []uint32 { +func (x *WriteUint32S) GetUint32S() []uint32 { if x != nil { - return x.WriteUint32S + return x.Uint32S } return nil } -func (x *WriteUint32S) GetWriteIndex_1() uint64 { +func (x *WriteUint32S) GetIndex_1() uint64 { if x != nil { - return x.WriteIndex_1 - } - return 0 -} - -func (x *WriteUint32S) GetWriteIndex_2() uint64 { - if x != nil { - return x.WriteIndex_2 + return x.Index_1 } return 0 } // WriteFlagsWithExpire 写入标志位 type WriteFlagsWithExpire struct { - state protoimpl.MessageState `protogen:"open.v1"` - WriteFlagsWithExpire []*FlagWithExpire `protobuf:"bytes,1,rep,name=write_flags_with_expire,json=writeFlagsWithExpire,proto3" json:"write_flags_with_expire,omitempty"` // 写入的标志位 - WriteIndex_1 uint64 `protobuf:"varint,2,opt,name=write_index_1,json=writeIndex1,proto3" json:"write_index_1,omitempty"` // 写入标志位的索引值 - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache + state protoimpl.MessageState `protogen:"open.v1"` + 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"` // 写入标志位的索引值 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache } func (x *WriteFlagsWithExpire) Reset() { @@ -359,16 +359,16 @@ func (*WriteFlagsWithExpire) Descriptor() ([]byte, []int) { return file_cmd_proto_rawDescGZIP(), []int{4} } -func (x *WriteFlagsWithExpire) GetWriteFlagsWithExpire() []*FlagWithExpire { +func (x *WriteFlagsWithExpire) GetFlagsWithExpire() []*FlagWithExpire { if x != nil { - return x.WriteFlagsWithExpire + return x.FlagsWithExpire } return nil } -func (x *WriteFlagsWithExpire) GetWriteIndex_1() uint64 { +func (x *WriteFlagsWithExpire) GetIndex_1() uint64 { if x != nil { - return x.WriteIndex_1 + return x.Index_1 } return 0 } @@ -376,8 +376,9 @@ func (x *WriteFlagsWithExpire) GetWriteIndex_1() uint64 { // FlagWithExpire 标志位 type FlagWithExpire struct { state protoimpl.MessageState `protogen:"open.v1"` - Flag bool `protobuf:"varint,1,opt,name=flag,proto3" json:"flag,omitempty"` // 标志位 - Expire uint32 `protobuf:"varint,2,opt,name=expire,proto3" json:"expire,omitempty"` // 过期时间 + Flag bool `protobuf:"varint,1,opt,name=flag,proto3" json:"flag,omitempty"` // 标志位 + DefaultFlag bool `protobuf:"varint,2,opt,name=default_flag,json=defaultFlag,proto3" json:"default_flag,omitempty"` // 默认值。超时后则回到默认值。 + Expire uint32 `protobuf:"varint,3,opt,name=expire,proto3" json:"expire,omitempty"` // 过期时间,为 0 则永不过期 unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -419,6 +420,13 @@ func (x *FlagWithExpire) GetFlag() bool { return false } +func (x *FlagWithExpire) GetDefaultFlag() bool { + if x != nil { + return x.DefaultFlag + } + return false +} + func (x *FlagWithExpire) GetExpire() uint32 { if x != nil { return x.Expire @@ -426,38 +434,93 @@ func (x *FlagWithExpire) GetExpire() uint32 { return 0 } +type SaasRes struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // 返回码 + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // 返回信息 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SaasRes) Reset() { + *x = SaasRes{} + mi := &file_cmd_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SaasRes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SaasRes) ProtoMessage() {} + +func (x *SaasRes) ProtoReflect() protoreflect.Message { + mi := &file_cmd_proto_msgTypes[6] + 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 SaasRes.ProtoReflect.Descriptor instead. +func (*SaasRes) Descriptor() ([]byte, []int) { + return file_cmd_proto_rawDescGZIP(), []int{6} +} + +func (x *SaasRes) GetCode() uint32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *SaasRes) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + var File_cmd_proto protoreflect.FileDescriptor const file_cmd_proto_rawDesc = "" + "\n" + - "\tcmd.proto\x12\asaasapi\"r\n" + - "\x04Cmds\x124\n" + + "\tcmd.proto\x12\asaasapi\"|\n" + + "\aSaasReq\x124\n" + "\vuserid_type\x18\x01 \x01(\x0e2\x13.saasapi.UserIdTypeR\n" + "useridType\x12\x14\n" + - "\x05appid\x18\x02 \x01(\tR\x05appid\x12\x1e\n" + - "\x03cmd\x18\x03 \x03(\v2\f.saasapi.CmdR\x03cmd\"\xe5\x01\n" + - "\x03Cmd\x12\x16\n" + + "\x05appid\x18\x02 \x01(\tR\x05appid\x12%\n" + + "\x04cmds\x18\x03 \x03(\v2\x11.saasapi.WriteCmdR\x04cmds\"\x96\x02\n" + + "\bWriteCmd\x12\x16\n" + "\x06userid\x18\x01 \x01(\tR\x06userid\x124\n" + "\vwrite_bytes\x18\x02 \x01(\v2\x13.saasapi.WriteBytesR\n" + "writeBytes\x12:\n" + "\rwrite_uint32s\x18\x03 \x01(\v2\x15.saasapi.WriteUint32sR\fwriteUint32s\x12T\n" + - "\x17write_flags_with_expire\x18\x04 \x01(\v2\x1d.saasapi.WriteFlagsWithExpireR\x14writeFlagsWithExpire\"u\n" + + "\x17write_flags_with_expire\x18\x04 \x01(\v2\x1d.saasapi.WriteFlagsWithExpireR\x14writeFlagsWithExpire\x12*\n" + + "\x11is_full_overwrite\x18\x05 \x01(\bR\x0fisFullOverwrite\"T\n" + "\n" + - "WriteBytes\x12\x1f\n" + - "\vwrite_bytes\x18\x01 \x01(\fR\n" + - "writeBytes\x12\"\n" + - "\rwrite_index_1\x18\x02 \x01(\x04R\vwriteIndex1\x12\"\n" + - "\rwrite_index_2\x18\x03 \x01(\x04R\vwriteIndex2\"{\n" + - "\fWriteUint32s\x12#\n" + - "\rwrite_uint32s\x18\x01 \x03(\rR\fwriteUint32s\x12\"\n" + - "\rwrite_index_1\x18\x02 \x01(\x04R\vwriteIndex1\x12\"\n" + - "\rwrite_index_2\x18\x03 \x01(\x04R\vwriteIndex2\"\x8a\x01\n" + - "\x14WriteFlagsWithExpire\x12N\n" + - "\x17write_flags_with_expire\x18\x01 \x03(\v2\x17.saasapi.FlagWithExpireR\x14writeFlagsWithExpire\x12\"\n" + - "\rwrite_index_1\x18\x02 \x01(\x04R\vwriteIndex1\"<\n" + + "WriteBytes\x12\x14\n" + + "\x05bytes\x18\x01 \x01(\fR\x05bytes\x12\x17\n" + + "\aindex_1\x18\x02 \x01(\x04R\x06index1\x12\x17\n" + + "\aindex_2\x18\x03 \x01(\x04R\x06index2\"A\n" + + "\fWriteUint32s\x12\x18\n" + + "\auint32s\x18\x01 \x03(\rR\auint32s\x12\x17\n" + + "\aindex_1\x18\x02 \x01(\x04R\x06index1\"t\n" + + "\x14WriteFlagsWithExpire\x12C\n" + + "\x11flags_with_expire\x18\x01 \x03(\v2\x17.saasapi.FlagWithExpireR\x0fflagsWithExpire\x12\x17\n" + + "\aindex_1\x18\x02 \x01(\x04R\x06index1\"_\n" + "\x0eFlagWithExpire\x12\x12\n" + - "\x04flag\x18\x01 \x01(\bR\x04flag\x12\x16\n" + - "\x06expire\x18\x02 \x01(\rR\x06expire*&\n" + + "\x04flag\x18\x01 \x01(\bR\x04flag\x12!\n" + + "\fdefault_flag\x18\x02 \x01(\bR\vdefaultFlag\x12\x16\n" + + "\x06expire\x18\x03 \x01(\rR\x06expire\"5\n" + + "\aSaasRes\x12\x12\n" + + "\x04code\x18\x01 \x01(\rR\x04code\x12\x16\n" + + "\x06status\x18\x02 \x01(\tR\x06status*&\n" + "\n" + "UserIdType\x12\f\n" + "\bDeviceId\x10\x00\x12\n" + @@ -477,23 +540,24 @@ func file_cmd_proto_rawDescGZIP() []byte { } var file_cmd_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_cmd_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_cmd_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_cmd_proto_goTypes = []any{ (UserIdType)(0), // 0: saasapi.UserIdType - (*Cmds)(nil), // 1: saasapi.Cmds - (*Cmd)(nil), // 2: saasapi.Cmd + (*SaasReq)(nil), // 1: saasapi.SaasReq + (*WriteCmd)(nil), // 2: saasapi.WriteCmd (*WriteBytes)(nil), // 3: saasapi.WriteBytes (*WriteUint32S)(nil), // 4: saasapi.WriteUint32s (*WriteFlagsWithExpire)(nil), // 5: saasapi.WriteFlagsWithExpire (*FlagWithExpire)(nil), // 6: saasapi.FlagWithExpire + (*SaasRes)(nil), // 7: saasapi.SaasRes } var file_cmd_proto_depIdxs = []int32{ - 0, // 0: saasapi.Cmds.userid_type:type_name -> saasapi.UserIdType - 2, // 1: saasapi.Cmds.cmd:type_name -> saasapi.Cmd - 3, // 2: saasapi.Cmd.write_bytes:type_name -> saasapi.WriteBytes - 4, // 3: saasapi.Cmd.write_uint32s:type_name -> saasapi.WriteUint32s - 5, // 4: saasapi.Cmd.write_flags_with_expire:type_name -> saasapi.WriteFlagsWithExpire - 6, // 5: saasapi.WriteFlagsWithExpire.write_flags_with_expire:type_name -> saasapi.FlagWithExpire + 0, // 0: saasapi.SaasReq.userid_type:type_name -> saasapi.UserIdType + 2, // 1: saasapi.SaasReq.cmds:type_name -> saasapi.WriteCmd + 3, // 2: saasapi.WriteCmd.write_bytes:type_name -> saasapi.WriteBytes + 4, // 3: saasapi.WriteCmd.write_uint32s:type_name -> saasapi.WriteUint32s + 5, // 4: saasapi.WriteCmd.write_flags_with_expire:type_name -> saasapi.WriteFlagsWithExpire + 6, // 5: saasapi.WriteFlagsWithExpire.flags_with_expire:type_name -> saasapi.FlagWithExpire 6, // [6:6] is the sub-list for method output_type 6, // [6:6] is the sub-list for method input_type 6, // [6:6] is the sub-list for extension type_name @@ -512,7 +576,7 @@ func file_cmd_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_cmd_proto_rawDesc), len(file_cmd_proto_rawDesc)), NumEnums: 1, - NumMessages: 6, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/proto/saascmd/cmd.proto b/proto/saascmd/cmd.proto index c43edba..6a20e47 100644 --- a/proto/saascmd/cmd.proto +++ b/proto/saascmd/cmd.proto @@ -5,44 +5,46 @@ package saasapi; option go_package = "./saasapi"; // Cmds 批量命令 -message Cmds { +message SaasReq { UserIdType userid_type = 1; // 用户ID类型 string appid = 2; // 小程序/小游戏/公众号/视频号的appid - repeated Cmd cmd = 3; // 批量写入命令 + repeated WriteCmd cmds = 3; // 批量写入命令 } -// Cmd 上传命令 -message Cmd { +// WriteCmd 上传命令 +message WriteCmd { string userid = 1; // 用户ID WriteBytes write_bytes = 2; // byte区域 WriteUint32s write_uint32s = 3; // uint32区域 WriteFlagsWithExpire write_flags_with_expire = 4; // 标志位区域 + bool is_full_overwrite = 5; // 是否全量覆盖 } // WriteBytes 写入byte message WriteBytes { - bytes write_bytes = 1; // 写入的byte - uint64 write_index_1 = 2; // 写入byte的索引值(0..63) - uint64 write_index_2 = 3; // 写入byte的索引值(64..127) + bytes bytes = 1; // 写入的byte + uint64 index_1 = 2; // 写入byte的索引值(0..63) + uint64 index_2 = 3; // 写入byte的索引值(64..127) } // WriteUint32s 写入uint32 message WriteUint32s { - repeated uint32 write_uint32s = 1; // 写入的uint32 - uint64 write_index_1 = 2; // 写入uint32的索引值(0..63) - uint64 write_index_2 = 3; // 写入uint32的索引值(64..127) + repeated uint32 uint32s = 1; // 写入的uint32 + uint64 index_1 = 2; // 写入uint32的索引值(0..63) + //uint64 index_2 = 3; // 写入uint32的索引值(64..127) } // WriteFlagsWithExpire 写入标志位 message WriteFlagsWithExpire { - repeated FlagWithExpire write_flags_with_expire = 1; // 写入的标志位 - uint64 write_index_1 = 2; // 写入标志位的索引值 + repeated FlagWithExpire flags_with_expire = 1; // 写入的标志位 + uint64 index_1 = 2; // 写入标志位的索引值 } // FlagWithExpire 标志位 message FlagWithExpire { bool flag = 1; // 标志位 - uint32 expire = 2; // 过期时间 + bool default_flag = 2; // 默认值。超时后则回到默认值。 + uint32 expire = 3; // 过期时间,为 0 则永不过期 } // UserIdType 用户 ID 类型 @@ -51,6 +53,12 @@ enum UserIdType { OpenId = 1; // OpenId } +message SaasRes { + uint32 code = 1; // 返回码 + string status = 2; // 返回信息 + // repeated CmdsResItem cmd_res = 3; // 返回的命令 +} + /* //肯德基 Cmds {