更改协议
This commit is contained in:
244
cmd.pb.go
244
cmd.pb.go
@@ -69,29 +69,29 @@ func (UserIdType) EnumDescriptor() ([]byte, []int) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Cmds 批量命令
|
// Cmds 批量命令
|
||||||
type Cmds struct {
|
type SaasReq struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
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类型
|
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
|
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
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Cmds) Reset() {
|
func (x *SaasReq) Reset() {
|
||||||
*x = Cmds{}
|
*x = SaasReq{}
|
||||||
mi := &file_cmd_proto_msgTypes[0]
|
mi := &file_cmd_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Cmds) String() string {
|
func (x *SaasReq) String() string {
|
||||||
return protoimpl.X.MessageStringOf(x)
|
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]
|
mi := &file_cmd_proto_msgTypes[0]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
@@ -103,57 +103,58 @@ func (x *Cmds) ProtoReflect() protoreflect.Message {
|
|||||||
return mi.MessageOf(x)
|
return mi.MessageOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Use Cmds.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SaasReq.ProtoReflect.Descriptor instead.
|
||||||
func (*Cmds) Descriptor() ([]byte, []int) {
|
func (*SaasReq) Descriptor() ([]byte, []int) {
|
||||||
return file_cmd_proto_rawDescGZIP(), []int{0}
|
return file_cmd_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Cmds) GetUseridType() UserIdType {
|
func (x *SaasReq) GetUseridType() UserIdType {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.UseridType
|
return x.UseridType
|
||||||
}
|
}
|
||||||
return UserIdType_DeviceId
|
return UserIdType_DeviceId
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Cmds) GetAppid() string {
|
func (x *SaasReq) GetAppid() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Appid
|
return x.Appid
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Cmds) GetCmd() []*Cmd {
|
func (x *SaasReq) GetCmds() []*WriteCmd {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Cmd
|
return x.Cmds
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cmd 上传命令
|
// WriteCmd 上传命令
|
||||||
type Cmd struct {
|
type WriteCmd struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Userid string `protobuf:"bytes,1,opt,name=userid,proto3" json:"userid,omitempty"` // 用户ID
|
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区域
|
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区域
|
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"` // 标志位区域
|
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
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Cmd) Reset() {
|
func (x *WriteCmd) Reset() {
|
||||||
*x = Cmd{}
|
*x = WriteCmd{}
|
||||||
mi := &file_cmd_proto_msgTypes[1]
|
mi := &file_cmd_proto_msgTypes[1]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Cmd) String() string {
|
func (x *WriteCmd) String() string {
|
||||||
return protoimpl.X.MessageStringOf(x)
|
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]
|
mi := &file_cmd_proto_msgTypes[1]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
@@ -165,45 +166,52 @@ func (x *Cmd) ProtoReflect() protoreflect.Message {
|
|||||||
return mi.MessageOf(x)
|
return mi.MessageOf(x)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: Use Cmd.ProtoReflect.Descriptor instead.
|
// Deprecated: Use WriteCmd.ProtoReflect.Descriptor instead.
|
||||||
func (*Cmd) Descriptor() ([]byte, []int) {
|
func (*WriteCmd) Descriptor() ([]byte, []int) {
|
||||||
return file_cmd_proto_rawDescGZIP(), []int{1}
|
return file_cmd_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Cmd) GetUserid() string {
|
func (x *WriteCmd) GetUserid() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Userid
|
return x.Userid
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Cmd) GetWriteBytes() *WriteBytes {
|
func (x *WriteCmd) GetWriteBytes() *WriteBytes {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.WriteBytes
|
return x.WriteBytes
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Cmd) GetWriteUint32S() *WriteUint32S {
|
func (x *WriteCmd) GetWriteUint32S() *WriteUint32S {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.WriteUint32S
|
return x.WriteUint32S
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Cmd) GetWriteFlagsWithExpire() *WriteFlagsWithExpire {
|
func (x *WriteCmd) GetWriteFlagsWithExpire() *WriteFlagsWithExpire {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.WriteFlagsWithExpire
|
return x.WriteFlagsWithExpire
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *WriteCmd) GetIsFullOverwrite() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.IsFullOverwrite
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
// WriteBytes 写入byte
|
// WriteBytes 写入byte
|
||||||
type WriteBytes struct {
|
type WriteBytes struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
WriteBytes []byte `protobuf:"bytes,1,opt,name=write_bytes,json=writeBytes,proto3" json:"write_bytes,omitempty"` // 写入的byte
|
Bytes []byte `protobuf:"bytes,1,opt,name=bytes,proto3" json:"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)
|
Index_1 uint64 `protobuf:"varint,2,opt,name=index_1,json=index1,proto3" json:"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)
|
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
|
||||||
}
|
}
|
||||||
@@ -238,23 +246,23 @@ func (*WriteBytes) Descriptor() ([]byte, []int) {
|
|||||||
return file_cmd_proto_rawDescGZIP(), []int{2}
|
return file_cmd_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WriteBytes) GetWriteBytes() []byte {
|
func (x *WriteBytes) GetBytes() []byte {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.WriteBytes
|
return x.Bytes
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WriteBytes) GetWriteIndex_1() uint64 {
|
func (x *WriteBytes) GetIndex_1() uint64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.WriteIndex_1
|
return x.Index_1
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WriteBytes) GetWriteIndex_2() uint64 {
|
func (x *WriteBytes) GetIndex_2() uint64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.WriteIndex_2
|
return x.Index_2
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -262,9 +270,8 @@ func (x *WriteBytes) GetWriteIndex_2() uint64 {
|
|||||||
// WriteUint32s 写入uint32
|
// WriteUint32s 写入uint32
|
||||||
type WriteUint32S struct {
|
type WriteUint32S struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
WriteUint32S []uint32 `protobuf:"varint,1,rep,packed,name=write_uint32s,json=writeUint32s,proto3" json:"write_uint32s,omitempty"` // 写入的uint32
|
Uint32S []uint32 `protobuf:"varint,1,rep,packed,name=uint32s,proto3" json:"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)
|
Index_1 uint64 `protobuf:"varint,2,opt,name=index_1,json=index1,proto3" json:"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)
|
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@@ -299,34 +306,27 @@ func (*WriteUint32S) Descriptor() ([]byte, []int) {
|
|||||||
return file_cmd_proto_rawDescGZIP(), []int{3}
|
return file_cmd_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WriteUint32S) GetWriteUint32S() []uint32 {
|
func (x *WriteUint32S) GetUint32S() []uint32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.WriteUint32S
|
return x.Uint32S
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WriteUint32S) GetWriteIndex_1() uint64 {
|
func (x *WriteUint32S) GetIndex_1() uint64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.WriteIndex_1
|
return x.Index_1
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (x *WriteUint32S) GetWriteIndex_2() uint64 {
|
|
||||||
if x != nil {
|
|
||||||
return x.WriteIndex_2
|
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// WriteFlagsWithExpire 写入标志位
|
// WriteFlagsWithExpire 写入标志位
|
||||||
type WriteFlagsWithExpire struct {
|
type WriteFlagsWithExpire struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
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"` // 写入的标志位
|
FlagsWithExpire []*FlagWithExpire `protobuf:"bytes,1,rep,name=flags_with_expire,json=flagsWithExpire,proto3" json:"flags_with_expire,omitempty"` // 写入的标志位
|
||||||
WriteIndex_1 uint64 `protobuf:"varint,2,opt,name=write_index_1,json=writeIndex1,proto3" json:"write_index_1,omitempty"` // 写入标志位的索引值
|
Index_1 uint64 `protobuf:"varint,2,opt,name=index_1,json=index1,proto3" json:"index_1,omitempty"` // 写入标志位的索引值
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WriteFlagsWithExpire) Reset() {
|
func (x *WriteFlagsWithExpire) Reset() {
|
||||||
@@ -359,16 +359,16 @@ func (*WriteFlagsWithExpire) Descriptor() ([]byte, []int) {
|
|||||||
return file_cmd_proto_rawDescGZIP(), []int{4}
|
return file_cmd_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WriteFlagsWithExpire) GetWriteFlagsWithExpire() []*FlagWithExpire {
|
func (x *WriteFlagsWithExpire) GetFlagsWithExpire() []*FlagWithExpire {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.WriteFlagsWithExpire
|
return x.FlagsWithExpire
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *WriteFlagsWithExpire) GetWriteIndex_1() uint64 {
|
func (x *WriteFlagsWithExpire) GetIndex_1() uint64 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.WriteIndex_1
|
return x.Index_1
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
@@ -376,8 +376,9 @@ func (x *WriteFlagsWithExpire) GetWriteIndex_1() uint64 {
|
|||||||
// FlagWithExpire 标志位
|
// FlagWithExpire 标志位
|
||||||
type FlagWithExpire struct {
|
type FlagWithExpire struct {
|
||||||
state protoimpl.MessageState `protogen:"open.v1"`
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
Flag bool `protobuf:"varint,1,opt,name=flag,proto3" json:"flag,omitempty"` // 标志位
|
Flag bool `protobuf:"varint,1,opt,name=flag,proto3" json:"flag,omitempty"` // 标志位
|
||||||
Expire uint32 `protobuf:"varint,2,opt,name=expire,proto3" json:"expire,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
|
unknownFields protoimpl.UnknownFields
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
}
|
}
|
||||||
@@ -419,6 +420,13 @@ func (x *FlagWithExpire) GetFlag() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *FlagWithExpire) GetDefaultFlag() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.DefaultFlag
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
func (x *FlagWithExpire) GetExpire() uint32 {
|
func (x *FlagWithExpire) GetExpire() uint32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Expire
|
return x.Expire
|
||||||
@@ -426,38 +434,93 @@ func (x *FlagWithExpire) GetExpire() uint32 {
|
|||||||
return 0
|
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
|
var File_cmd_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
const file_cmd_proto_rawDesc = "" +
|
const file_cmd_proto_rawDesc = "" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"\tcmd.proto\x12\asaasapi\"r\n" +
|
"\tcmd.proto\x12\asaasapi\"|\n" +
|
||||||
"\x04Cmds\x124\n" +
|
"\aSaasReq\x124\n" +
|
||||||
"\vuserid_type\x18\x01 \x01(\x0e2\x13.saasapi.UserIdTypeR\n" +
|
"\vuserid_type\x18\x01 \x01(\x0e2\x13.saasapi.UserIdTypeR\n" +
|
||||||
"useridType\x12\x14\n" +
|
"useridType\x12\x14\n" +
|
||||||
"\x05appid\x18\x02 \x01(\tR\x05appid\x12\x1e\n" +
|
"\x05appid\x18\x02 \x01(\tR\x05appid\x12%\n" +
|
||||||
"\x03cmd\x18\x03 \x03(\v2\f.saasapi.CmdR\x03cmd\"\xe5\x01\n" +
|
"\x04cmds\x18\x03 \x03(\v2\x11.saasapi.WriteCmdR\x04cmds\"\x96\x02\n" +
|
||||||
"\x03Cmd\x12\x16\n" +
|
"\bWriteCmd\x12\x16\n" +
|
||||||
"\x06userid\x18\x01 \x01(\tR\x06userid\x124\n" +
|
"\x06userid\x18\x01 \x01(\tR\x06userid\x124\n" +
|
||||||
"\vwrite_bytes\x18\x02 \x01(\v2\x13.saasapi.WriteBytesR\n" +
|
"\vwrite_bytes\x18\x02 \x01(\v2\x13.saasapi.WriteBytesR\n" +
|
||||||
"writeBytes\x12:\n" +
|
"writeBytes\x12:\n" +
|
||||||
"\rwrite_uint32s\x18\x03 \x01(\v2\x15.saasapi.WriteUint32sR\fwriteUint32s\x12T\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" +
|
"\n" +
|
||||||
"WriteBytes\x12\x1f\n" +
|
"WriteBytes\x12\x14\n" +
|
||||||
"\vwrite_bytes\x18\x01 \x01(\fR\n" +
|
"\x05bytes\x18\x01 \x01(\fR\x05bytes\x12\x17\n" +
|
||||||
"writeBytes\x12\"\n" +
|
"\aindex_1\x18\x02 \x01(\x04R\x06index1\x12\x17\n" +
|
||||||
"\rwrite_index_1\x18\x02 \x01(\x04R\vwriteIndex1\x12\"\n" +
|
"\aindex_2\x18\x03 \x01(\x04R\x06index2\"A\n" +
|
||||||
"\rwrite_index_2\x18\x03 \x01(\x04R\vwriteIndex2\"{\n" +
|
"\fWriteUint32s\x12\x18\n" +
|
||||||
"\fWriteUint32s\x12#\n" +
|
"\auint32s\x18\x01 \x03(\rR\auint32s\x12\x17\n" +
|
||||||
"\rwrite_uint32s\x18\x01 \x03(\rR\fwriteUint32s\x12\"\n" +
|
"\aindex_1\x18\x02 \x01(\x04R\x06index1\"t\n" +
|
||||||
"\rwrite_index_1\x18\x02 \x01(\x04R\vwriteIndex1\x12\"\n" +
|
"\x14WriteFlagsWithExpire\x12C\n" +
|
||||||
"\rwrite_index_2\x18\x03 \x01(\x04R\vwriteIndex2\"\x8a\x01\n" +
|
"\x11flags_with_expire\x18\x01 \x03(\v2\x17.saasapi.FlagWithExpireR\x0fflagsWithExpire\x12\x17\n" +
|
||||||
"\x14WriteFlagsWithExpire\x12N\n" +
|
"\aindex_1\x18\x02 \x01(\x04R\x06index1\"_\n" +
|
||||||
"\x17write_flags_with_expire\x18\x01 \x03(\v2\x17.saasapi.FlagWithExpireR\x14writeFlagsWithExpire\x12\"\n" +
|
|
||||||
"\rwrite_index_1\x18\x02 \x01(\x04R\vwriteIndex1\"<\n" +
|
|
||||||
"\x0eFlagWithExpire\x12\x12\n" +
|
"\x0eFlagWithExpire\x12\x12\n" +
|
||||||
"\x04flag\x18\x01 \x01(\bR\x04flag\x12\x16\n" +
|
"\x04flag\x18\x01 \x01(\bR\x04flag\x12!\n" +
|
||||||
"\x06expire\x18\x02 \x01(\rR\x06expire*&\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" +
|
"\n" +
|
||||||
"UserIdType\x12\f\n" +
|
"UserIdType\x12\f\n" +
|
||||||
"\bDeviceId\x10\x00\x12\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_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{
|
var file_cmd_proto_goTypes = []any{
|
||||||
(UserIdType)(0), // 0: saasapi.UserIdType
|
(UserIdType)(0), // 0: saasapi.UserIdType
|
||||||
(*Cmds)(nil), // 1: saasapi.Cmds
|
(*SaasReq)(nil), // 1: saasapi.SaasReq
|
||||||
(*Cmd)(nil), // 2: saasapi.Cmd
|
(*WriteCmd)(nil), // 2: saasapi.WriteCmd
|
||||||
(*WriteBytes)(nil), // 3: saasapi.WriteBytes
|
(*WriteBytes)(nil), // 3: saasapi.WriteBytes
|
||||||
(*WriteUint32S)(nil), // 4: saasapi.WriteUint32s
|
(*WriteUint32S)(nil), // 4: saasapi.WriteUint32s
|
||||||
(*WriteFlagsWithExpire)(nil), // 5: saasapi.WriteFlagsWithExpire
|
(*WriteFlagsWithExpire)(nil), // 5: saasapi.WriteFlagsWithExpire
|
||||||
(*FlagWithExpire)(nil), // 6: saasapi.FlagWithExpire
|
(*FlagWithExpire)(nil), // 6: saasapi.FlagWithExpire
|
||||||
|
(*SaasRes)(nil), // 7: saasapi.SaasRes
|
||||||
}
|
}
|
||||||
var file_cmd_proto_depIdxs = []int32{
|
var file_cmd_proto_depIdxs = []int32{
|
||||||
0, // 0: saasapi.Cmds.userid_type:type_name -> saasapi.UserIdType
|
0, // 0: saasapi.SaasReq.userid_type:type_name -> saasapi.UserIdType
|
||||||
2, // 1: saasapi.Cmds.cmd:type_name -> saasapi.Cmd
|
2, // 1: saasapi.SaasReq.cmds:type_name -> saasapi.WriteCmd
|
||||||
3, // 2: saasapi.Cmd.write_bytes:type_name -> saasapi.WriteBytes
|
3, // 2: saasapi.WriteCmd.write_bytes:type_name -> saasapi.WriteBytes
|
||||||
4, // 3: saasapi.Cmd.write_uint32s:type_name -> saasapi.WriteUint32s
|
4, // 3: saasapi.WriteCmd.write_uint32s:type_name -> saasapi.WriteUint32s
|
||||||
5, // 4: saasapi.Cmd.write_flags_with_expire:type_name -> saasapi.WriteFlagsWithExpire
|
5, // 4: saasapi.WriteCmd.write_flags_with_expire:type_name -> saasapi.WriteFlagsWithExpire
|
||||||
6, // 5: saasapi.WriteFlagsWithExpire.write_flags_with_expire:type_name -> saasapi.FlagWithExpire
|
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 output_type
|
||||||
6, // [6:6] is the sub-list for method input_type
|
6, // [6:6] is the sub-list for method input_type
|
||||||
6, // [6:6] is the sub-list for extension type_name
|
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(),
|
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: 1,
|
NumEnums: 1,
|
||||||
NumMessages: 6,
|
NumMessages: 7,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,44 +5,46 @@ package saasapi;
|
|||||||
option go_package = "./saasapi";
|
option go_package = "./saasapi";
|
||||||
|
|
||||||
// Cmds 批量命令
|
// Cmds 批量命令
|
||||||
message Cmds {
|
message SaasReq {
|
||||||
UserIdType userid_type = 1; // 用户ID类型
|
UserIdType userid_type = 1; // 用户ID类型
|
||||||
string appid = 2; // 小程序/小游戏/公众号/视频号的appid
|
string appid = 2; // 小程序/小游戏/公众号/视频号的appid
|
||||||
repeated Cmd cmd = 3; // 批量写入命令
|
repeated WriteCmd cmds = 3; // 批量写入命令
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cmd 上传命令
|
// WriteCmd 上传命令
|
||||||
message Cmd {
|
message WriteCmd {
|
||||||
string userid = 1; // 用户ID
|
string userid = 1; // 用户ID
|
||||||
WriteBytes write_bytes = 2; // byte区域
|
WriteBytes write_bytes = 2; // byte区域
|
||||||
WriteUint32s write_uint32s = 3; // uint32区域
|
WriteUint32s write_uint32s = 3; // uint32区域
|
||||||
WriteFlagsWithExpire write_flags_with_expire = 4; // 标志位区域
|
WriteFlagsWithExpire write_flags_with_expire = 4; // 标志位区域
|
||||||
|
bool is_full_overwrite = 5; // 是否全量覆盖
|
||||||
}
|
}
|
||||||
|
|
||||||
// WriteBytes 写入byte
|
// WriteBytes 写入byte
|
||||||
message WriteBytes {
|
message WriteBytes {
|
||||||
bytes write_bytes = 1; // 写入的byte
|
bytes bytes = 1; // 写入的byte
|
||||||
uint64 write_index_1 = 2; // 写入byte的索引值(0..63)
|
uint64 index_1 = 2; // 写入byte的索引值(0..63)
|
||||||
uint64 write_index_2 = 3; // 写入byte的索引值(64..127)
|
uint64 index_2 = 3; // 写入byte的索引值(64..127)
|
||||||
}
|
}
|
||||||
|
|
||||||
// WriteUint32s 写入uint32
|
// WriteUint32s 写入uint32
|
||||||
message WriteUint32s {
|
message WriteUint32s {
|
||||||
repeated uint32 write_uint32s = 1; // 写入的uint32
|
repeated uint32 uint32s = 1; // 写入的uint32
|
||||||
uint64 write_index_1 = 2; // 写入uint32的索引值(0..63)
|
uint64 index_1 = 2; // 写入uint32的索引值(0..63)
|
||||||
uint64 write_index_2 = 3; // 写入uint32的索引值(64..127)
|
//uint64 index_2 = 3; // 写入uint32的索引值(64..127)
|
||||||
}
|
}
|
||||||
|
|
||||||
// WriteFlagsWithExpire 写入标志位
|
// WriteFlagsWithExpire 写入标志位
|
||||||
message WriteFlagsWithExpire {
|
message WriteFlagsWithExpire {
|
||||||
repeated FlagWithExpire write_flags_with_expire = 1; // 写入的标志位
|
repeated FlagWithExpire flags_with_expire = 1; // 写入的标志位
|
||||||
uint64 write_index_1 = 2; // 写入标志位的索引值
|
uint64 index_1 = 2; // 写入标志位的索引值
|
||||||
}
|
}
|
||||||
|
|
||||||
// FlagWithExpire 标志位
|
// FlagWithExpire 标志位
|
||||||
message FlagWithExpire {
|
message FlagWithExpire {
|
||||||
bool flag = 1; // 标志位
|
bool flag = 1; // 标志位
|
||||||
uint32 expire = 2; // 过期时间
|
bool default_flag = 2; // 默认值。超时后则回到默认值。
|
||||||
|
uint32 expire = 3; // 过期时间,为 0 则永不过期
|
||||||
}
|
}
|
||||||
|
|
||||||
// UserIdType 用户 ID 类型
|
// UserIdType 用户 ID 类型
|
||||||
@@ -51,6 +53,12 @@ enum UserIdType {
|
|||||||
OpenId = 1; // OpenId
|
OpenId = 1; // OpenId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message SaasRes {
|
||||||
|
uint32 code = 1; // 返回码
|
||||||
|
string status = 2; // 返回信息
|
||||||
|
// repeated CmdsResItem cmd_res = 3; // 返回的命令
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
//肯德基
|
//肯德基
|
||||||
Cmds {
|
Cmds {
|
||||||
|
|||||||
Reference in New Issue
Block a user