|
@ -9,9 +9,32 @@ It is generated from these files: |
|
|
redis.proto |
|
|
redis.proto |
|
|
|
|
|
|
|
|
It has these top-level messages: |
|
|
It has these top-level messages: |
|
|
GetKey |
|
|
|
|
|
GetHashKey |
|
|
|
|
|
GetResponse |
|
|
|
|
|
|
|
|
GetRequest |
|
|
|
|
|
SetRequest |
|
|
|
|
|
DelRequest |
|
|
|
|
|
HGetRequest |
|
|
|
|
|
HSetRequest |
|
|
|
|
|
HDelRequest |
|
|
|
|
|
SetExpireRequest |
|
|
|
|
|
GetStringResponse |
|
|
|
|
|
HGetListResponse |
|
|
|
|
|
SetResponse |
|
|
|
|
|
DelResponse |
|
|
|
|
|
HSetResponse |
|
|
|
|
|
SetExpireResponse |
|
|
|
|
|
SSetRequest |
|
|
|
|
|
SMembersRequest |
|
|
|
|
|
SSetResponse |
|
|
|
|
|
LSetRequest |
|
|
|
|
|
LSetResponse |
|
|
|
|
|
LRangeRequest |
|
|
|
|
|
LLenRequest |
|
|
|
|
|
AddRequest |
|
|
|
|
|
AddResponse |
|
|
|
|
|
ZSetRequest |
|
|
|
|
|
ZSetResponse |
|
|
|
|
|
ZRangeRequest |
|
|
|
|
|
ZScanRequest |
|
|
*/ |
|
|
*/ |
|
|
package redisrpc |
|
|
package redisrpc |
|
|
|
|
|
|
|
@ -30,16 +53,65 @@ var _ = proto.Marshal |
|
|
var _ = math.Inf |
|
|
var _ = math.Inf |
|
|
|
|
|
|
|
|
// 使用key查询
|
|
|
// 使用key查询
|
|
|
type GetKey struct { |
|
|
|
|
|
|
|
|
type GetRequest struct { |
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (m *GetKey) Reset() { *m = GetKey{} } |
|
|
|
|
|
func (m *GetKey) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*GetKey) ProtoMessage() {} |
|
|
|
|
|
|
|
|
func (m *GetRequest) Reset() { *m = GetRequest{} } |
|
|
|
|
|
func (m *GetRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*GetRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
func (m *GetKey) GetKey() string { |
|
|
|
|
|
|
|
|
func (m *GetRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 设置key
|
|
|
|
|
|
type SetRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` |
|
|
|
|
|
Ttl *int64 `protobuf:"varint,3,opt,name=ttl" json:"ttl,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SetRequest) Reset() { *m = SetRequest{} } |
|
|
|
|
|
func (m *SetRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*SetRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SetRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SetRequest) GetValue() string { |
|
|
|
|
|
if m != nil && m.Value != nil { |
|
|
|
|
|
return *m.Value |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SetRequest) GetTtl() int64 { |
|
|
|
|
|
if m != nil && m.Ttl != nil { |
|
|
|
|
|
return *m.Ttl |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type DelRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *DelRequest) Reset() { *m = DelRequest{} } |
|
|
|
|
|
func (m *DelRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*DelRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *DelRequest) GetKey() string { |
|
|
if m != nil && m.Key != nil { |
|
|
if m != nil && m.Key != nil { |
|
|
return *m.Key |
|
|
return *m.Key |
|
|
} |
|
|
} |
|
@ -47,53 +119,554 @@ func (m *GetKey) GetKey() string { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 使用hash key查询
|
|
|
// 使用hash key查询
|
|
|
type GetHashKey struct { |
|
|
|
|
|
|
|
|
type HGetRequest struct { |
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
Field *string `protobuf:"bytes,2,opt,name=field" json:"field,omitempty"` |
|
|
Field *string `protobuf:"bytes,2,opt,name=field" json:"field,omitempty"` |
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (m *GetHashKey) Reset() { *m = GetHashKey{} } |
|
|
|
|
|
func (m *GetHashKey) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*GetHashKey) ProtoMessage() {} |
|
|
|
|
|
|
|
|
func (m *HGetRequest) Reset() { *m = HGetRequest{} } |
|
|
|
|
|
func (m *HGetRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*HGetRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
func (m *GetHashKey) GetKey() string { |
|
|
|
|
|
|
|
|
func (m *HGetRequest) GetKey() string { |
|
|
if m != nil && m.Key != nil { |
|
|
if m != nil && m.Key != nil { |
|
|
return *m.Key |
|
|
return *m.Key |
|
|
} |
|
|
} |
|
|
return "" |
|
|
return "" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (m *GetHashKey) GetField() string { |
|
|
|
|
|
|
|
|
func (m *HGetRequest) GetField() string { |
|
|
if m != nil && m.Field != nil { |
|
|
if m != nil && m.Field != nil { |
|
|
return *m.Field |
|
|
return *m.Field |
|
|
} |
|
|
} |
|
|
return "" |
|
|
return "" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 设置hash key
|
|
|
|
|
|
type HSetRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
Field *string `protobuf:"bytes,2,opt,name=field" json:"field,omitempty"` |
|
|
|
|
|
Value *string `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *HSetRequest) Reset() { *m = HSetRequest{} } |
|
|
|
|
|
func (m *HSetRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*HSetRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *HSetRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *HSetRequest) GetField() string { |
|
|
|
|
|
if m != nil && m.Field != nil { |
|
|
|
|
|
return *m.Field |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *HSetRequest) GetValue() string { |
|
|
|
|
|
if m != nil && m.Value != nil { |
|
|
|
|
|
return *m.Value |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 删除hash key
|
|
|
|
|
|
type HDelRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
Field *string `protobuf:"bytes,2,opt,name=field" json:"field,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *HDelRequest) Reset() { *m = HDelRequest{} } |
|
|
|
|
|
func (m *HDelRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*HDelRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *HDelRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *HDelRequest) GetField() string { |
|
|
|
|
|
if m != nil && m.Field != nil { |
|
|
|
|
|
return *m.Field |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 有效期
|
|
|
|
|
|
type SetExpireRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
Expire *int64 `protobuf:"varint,2,opt,name=expire" json:"expire,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SetExpireRequest) Reset() { *m = SetExpireRequest{} } |
|
|
|
|
|
func (m *SetExpireRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*SetExpireRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SetExpireRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SetExpireRequest) GetExpire() int64 { |
|
|
|
|
|
if m != nil && m.Expire != nil { |
|
|
|
|
|
return *m.Expire |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 使用key查询响应结构
|
|
|
|
|
|
type GetStringResponse struct { |
|
|
|
|
|
Value *string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *GetStringResponse) Reset() { *m = GetStringResponse{} } |
|
|
|
|
|
func (m *GetStringResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*GetStringResponse) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *GetStringResponse) GetValue() string { |
|
|
|
|
|
if m != nil && m.Value != nil { |
|
|
|
|
|
return *m.Value |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 使用key查询响应结构
|
|
|
// 使用key查询响应结构
|
|
|
type GetResponse struct { |
|
|
|
|
|
String_ *string `protobuf:"bytes,1,opt,name=string" json:"string,omitempty"` |
|
|
|
|
|
|
|
|
type HGetListResponse struct { |
|
|
|
|
|
List []byte `protobuf:"bytes,1,opt,name=list" json:"list,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *HGetListResponse) Reset() { *m = HGetListResponse{} } |
|
|
|
|
|
func (m *HGetListResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*HGetListResponse) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *HGetListResponse) GetList() []byte { |
|
|
|
|
|
if m != nil { |
|
|
|
|
|
return m.List |
|
|
|
|
|
} |
|
|
|
|
|
return nil |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 设置key响应结构
|
|
|
|
|
|
type SetResponse struct { |
|
|
|
|
|
Ret *string `protobuf:"bytes,1,opt,name=ret" json:"ret,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SetResponse) Reset() { *m = SetResponse{} } |
|
|
|
|
|
func (m *SetResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*SetResponse) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SetResponse) GetRet() string { |
|
|
|
|
|
if m != nil && m.Ret != nil { |
|
|
|
|
|
return *m.Ret |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 删除key响应结构
|
|
|
|
|
|
type DelResponse struct { |
|
|
|
|
|
Ret *int64 `protobuf:"varint,1,opt,name=ret" json:"ret,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *DelResponse) Reset() { *m = DelResponse{} } |
|
|
|
|
|
func (m *DelResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*DelResponse) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *DelResponse) GetRet() int64 { |
|
|
|
|
|
if m != nil && m.Ret != nil { |
|
|
|
|
|
return *m.Ret |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 设置key响应结构
|
|
|
|
|
|
type HSetResponse struct { |
|
|
|
|
|
Ret *int64 `protobuf:"varint,1,opt,name=ret" json:"ret,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *HSetResponse) Reset() { *m = HSetResponse{} } |
|
|
|
|
|
func (m *HSetResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*HSetResponse) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *HSetResponse) GetRet() int64 { |
|
|
|
|
|
if m != nil && m.Ret != nil { |
|
|
|
|
|
return *m.Ret |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 设置key有效期
|
|
|
|
|
|
type SetExpireResponse struct { |
|
|
|
|
|
Ret *int64 `protobuf:"varint,1,opt,name=ret" json:"ret,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SetExpireResponse) Reset() { *m = SetExpireResponse{} } |
|
|
|
|
|
func (m *SetExpireResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*SetExpireResponse) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SetExpireResponse) GetRet() int64 { |
|
|
|
|
|
if m != nil && m.Ret != nil { |
|
|
|
|
|
return *m.Ret |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 集合添加值
|
|
|
|
|
|
type SSetRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
Field *string `protobuf:"bytes,2,opt,name=field" json:"field,omitempty"` |
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (m *GetResponse) Reset() { *m = GetResponse{} } |
|
|
|
|
|
func (m *GetResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*GetResponse) ProtoMessage() {} |
|
|
|
|
|
|
|
|
func (m *SSetRequest) Reset() { *m = SSetRequest{} } |
|
|
|
|
|
func (m *SSetRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*SSetRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SSetRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
func (m *GetResponse) GetString_() string { |
|
|
|
|
|
if m != nil && m.String_ != nil { |
|
|
|
|
|
return *m.String_ |
|
|
|
|
|
|
|
|
func (m *SSetRequest) GetField() string { |
|
|
|
|
|
if m != nil && m.Field != nil { |
|
|
|
|
|
return *m.Field |
|
|
} |
|
|
} |
|
|
return "" |
|
|
return "" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 集合添加值
|
|
|
|
|
|
type SMembersRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SMembersRequest) Reset() { *m = SMembersRequest{} } |
|
|
|
|
|
func (m *SMembersRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*SMembersRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SMembersRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 设置响应结构
|
|
|
|
|
|
type SSetResponse struct { |
|
|
|
|
|
Ret *int64 `protobuf:"varint,1,opt,name=ret" json:"ret,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SSetResponse) Reset() { *m = SSetResponse{} } |
|
|
|
|
|
func (m *SSetResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*SSetResponse) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *SSetResponse) GetRet() int64 { |
|
|
|
|
|
if m != nil && m.Ret != nil { |
|
|
|
|
|
return *m.Ret |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 列表添加值
|
|
|
|
|
|
type LSetRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
Field *string `protobuf:"bytes,2,opt,name=field" json:"field,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *LSetRequest) Reset() { *m = LSetRequest{} } |
|
|
|
|
|
func (m *LSetRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*LSetRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *LSetRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *LSetRequest) GetField() string { |
|
|
|
|
|
if m != nil && m.Field != nil { |
|
|
|
|
|
return *m.Field |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 设置key响应结构
|
|
|
|
|
|
type LSetResponse struct { |
|
|
|
|
|
Ret *int64 `protobuf:"varint,1,opt,name=ret" json:"ret,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *LSetResponse) Reset() { *m = LSetResponse{} } |
|
|
|
|
|
func (m *LSetResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*LSetResponse) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *LSetResponse) GetRet() int64 { |
|
|
|
|
|
if m != nil && m.Ret != nil { |
|
|
|
|
|
return *m.Ret |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 列表取值
|
|
|
|
|
|
type LRangeRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
Start *int64 `protobuf:"varint,2,opt,name=start" json:"start,omitempty"` |
|
|
|
|
|
Stop *int64 `protobuf:"varint,3,opt,name=stop" json:"stop,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *LRangeRequest) Reset() { *m = LRangeRequest{} } |
|
|
|
|
|
func (m *LRangeRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*LRangeRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *LRangeRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *LRangeRequest) GetStart() int64 { |
|
|
|
|
|
if m != nil && m.Start != nil { |
|
|
|
|
|
return *m.Start |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *LRangeRequest) GetStop() int64 { |
|
|
|
|
|
if m != nil && m.Stop != nil { |
|
|
|
|
|
return *m.Stop |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 列表长度
|
|
|
|
|
|
type LLenRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *LLenRequest) Reset() { *m = LLenRequest{} } |
|
|
|
|
|
func (m *LLenRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*LLenRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *LLenRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 数值增加
|
|
|
|
|
|
type AddRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
Value *int64 `protobuf:"varint,2,opt,name=value" json:"value,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *AddRequest) Reset() { *m = AddRequest{} } |
|
|
|
|
|
func (m *AddRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*AddRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *AddRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *AddRequest) GetValue() int64 { |
|
|
|
|
|
if m != nil && m.Value != nil { |
|
|
|
|
|
return *m.Value |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type AddResponse struct { |
|
|
|
|
|
Ret *int64 `protobuf:"varint,1,opt,name=ret" json:"ret,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *AddResponse) Reset() { *m = AddResponse{} } |
|
|
|
|
|
func (m *AddResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*AddResponse) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *AddResponse) GetRet() int64 { |
|
|
|
|
|
if m != nil && m.Ret != nil { |
|
|
|
|
|
return *m.Ret |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 有序集合添加值
|
|
|
|
|
|
type ZSetRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
Score *string `protobuf:"bytes,2,opt,name=score" json:"score,omitempty"` |
|
|
|
|
|
Member *string `protobuf:"bytes,3,opt,name=member" json:"member,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZSetRequest) Reset() { *m = ZSetRequest{} } |
|
|
|
|
|
func (m *ZSetRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*ZSetRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZSetRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZSetRequest) GetScore() string { |
|
|
|
|
|
if m != nil && m.Score != nil { |
|
|
|
|
|
return *m.Score |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZSetRequest) GetMember() string { |
|
|
|
|
|
if m != nil && m.Member != nil { |
|
|
|
|
|
return *m.Member |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 设置响应结构
|
|
|
|
|
|
type ZSetResponse struct { |
|
|
|
|
|
Ret *int64 `protobuf:"varint,1,opt,name=ret" json:"ret,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZSetResponse) Reset() { *m = ZSetResponse{} } |
|
|
|
|
|
func (m *ZSetResponse) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*ZSetResponse) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZSetResponse) GetRet() int64 { |
|
|
|
|
|
if m != nil && m.Ret != nil { |
|
|
|
|
|
return *m.Ret |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 有序集合取值
|
|
|
|
|
|
type ZRangeRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
Start *int64 `protobuf:"varint,2,opt,name=start" json:"start,omitempty"` |
|
|
|
|
|
Stop *int64 `protobuf:"varint,3,opt,name=stop" json:"stop,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZRangeRequest) Reset() { *m = ZRangeRequest{} } |
|
|
|
|
|
func (m *ZRangeRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*ZRangeRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZRangeRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZRangeRequest) GetStart() int64 { |
|
|
|
|
|
if m != nil && m.Start != nil { |
|
|
|
|
|
return *m.Start |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZRangeRequest) GetStop() int64 { |
|
|
|
|
|
if m != nil && m.Stop != nil { |
|
|
|
|
|
return *m.Stop |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type ZScanRequest struct { |
|
|
|
|
|
Key *string `protobuf:"bytes,1,opt,name=key" json:"key,omitempty"` |
|
|
|
|
|
Field *string `protobuf:"bytes,2,opt,name=field" json:"field,omitempty"` |
|
|
|
|
|
Len *int64 `protobuf:"varint,3,opt,name=len" json:"len,omitempty"` |
|
|
|
|
|
XXX_unrecognized []byte `json:"-"` |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZScanRequest) Reset() { *m = ZScanRequest{} } |
|
|
|
|
|
func (m *ZScanRequest) String() string { return proto.CompactTextString(m) } |
|
|
|
|
|
func (*ZScanRequest) ProtoMessage() {} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZScanRequest) GetKey() string { |
|
|
|
|
|
if m != nil && m.Key != nil { |
|
|
|
|
|
return *m.Key |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZScanRequest) GetField() string { |
|
|
|
|
|
if m != nil && m.Field != nil { |
|
|
|
|
|
return *m.Field |
|
|
|
|
|
} |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (m *ZScanRequest) GetLen() int64 { |
|
|
|
|
|
if m != nil && m.Len != nil { |
|
|
|
|
|
return *m.Len |
|
|
|
|
|
} |
|
|
|
|
|
return 0 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
func init() { |
|
|
func init() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
type RedisService interface { |
|
|
type RedisService interface { |
|
|
GetByKey(in *GetKey, out *GetResponse) error |
|
|
|
|
|
GetByHashKey(in *GetHashKey, out *GetResponse) error |
|
|
|
|
|
|
|
|
Get(in *GetRequest, out *GetStringResponse) error |
|
|
|
|
|
Set(in *SetRequest, out *SetResponse) error |
|
|
|
|
|
SetNx(in *SetRequest, out *DelResponse) error |
|
|
|
|
|
Del(in *DelRequest, out *DelResponse) error |
|
|
|
|
|
HGet(in *HGetRequest, out *GetStringResponse) error |
|
|
|
|
|
HSet(in *HSetRequest, out *HSetResponse) error |
|
|
|
|
|
HDel(in *HDelRequest, out *DelResponse) error |
|
|
|
|
|
SetExpire(in *SetExpireRequest, out *SetExpireResponse) error |
|
|
|
|
|
HGetAll(in *GetRequest, out *HGetListResponse) error |
|
|
|
|
|
HGetList(in *GetRequest, out *HGetListResponse) error |
|
|
|
|
|
HExists(in *HGetRequest, out *DelResponse) error |
|
|
|
|
|
Exists(in *GetRequest, out *DelResponse) error |
|
|
|
|
|
HIncrby(in *HSetRequest, out *HSetResponse) error |
|
|
|
|
|
SAdd(in *SSetRequest, out *SSetResponse) error |
|
|
|
|
|
SIsmember(in *SSetRequest, out *SSetResponse) error |
|
|
|
|
|
SRem(in *SSetRequest, out *SSetResponse) error |
|
|
|
|
|
SCard(in *SMembersRequest, out *SSetResponse) error |
|
|
|
|
|
LLpush(in *LSetRequest, out *LSetResponse) error |
|
|
|
|
|
LRpush(in *LSetRequest, out *LSetResponse) error |
|
|
|
|
|
LRange(in *LRangeRequest, out *HGetListResponse) error |
|
|
|
|
|
LLen(in *LLenRequest, out *LSetResponse) error |
|
|
|
|
|
ReduceStock(in *SetRequest, out *SetResponse) error |
|
|
|
|
|
Incrby(in *AddRequest, out *AddResponse) error |
|
|
|
|
|
Decrby(in *AddRequest, out *AddResponse) error |
|
|
|
|
|
ZAdd(in *ZSetRequest, out *ZSetResponse) error |
|
|
|
|
|
ZIncrBy(in *ZSetRequest, out *ZSetResponse) error |
|
|
|
|
|
ZRange(in *ZRangeRequest, out *HGetListResponse) error |
|
|
|
|
|
ZScan(in *ZScanRequest, out *HGetListResponse) error |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// AcceptRedisServiceClient accepts connections on the listener and serves requests
|
|
|
// AcceptRedisServiceClient accepts connections on the listener and serves requests
|
|
@ -165,11 +738,89 @@ func NewRedisServiceClient(conn io.ReadWriteCloser) (*RedisServiceClient, *rpc.C |
|
|
return &RedisServiceClient{c}, c |
|
|
return &RedisServiceClient{c}, c |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func (c *RedisServiceClient) GetByKey(in *GetKey, out *GetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.GetByKey", in, out) |
|
|
|
|
|
|
|
|
func (c *RedisServiceClient) Get(in *GetRequest, out *GetStringResponse) error { |
|
|
|
|
|
return c.Call("RedisService.Get", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) Set(in *SetRequest, out *SetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.Set", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) SetNx(in *SetRequest, out *DelResponse) error { |
|
|
|
|
|
return c.Call("RedisService.SetNx", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) Del(in *DelRequest, out *DelResponse) error { |
|
|
|
|
|
return c.Call("RedisService.Del", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) HGet(in *HGetRequest, out *GetStringResponse) error { |
|
|
|
|
|
return c.Call("RedisService.HGet", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) HSet(in *HSetRequest, out *HSetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.HSet", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) HDel(in *HDelRequest, out *DelResponse) error { |
|
|
|
|
|
return c.Call("RedisService.HDel", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) SetExpire(in *SetExpireRequest, out *SetExpireResponse) error { |
|
|
|
|
|
return c.Call("RedisService.SetExpire", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) HGetAll(in *GetRequest, out *HGetListResponse) error { |
|
|
|
|
|
return c.Call("RedisService.HGetAll", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) HGetList(in *GetRequest, out *HGetListResponse) error { |
|
|
|
|
|
return c.Call("RedisService.HGetList", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) HExists(in *HGetRequest, out *DelResponse) error { |
|
|
|
|
|
return c.Call("RedisService.HExists", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) Exists(in *GetRequest, out *DelResponse) error { |
|
|
|
|
|
return c.Call("RedisService.Exists", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) HIncrby(in *HSetRequest, out *HSetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.HIncrby", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) SAdd(in *SSetRequest, out *SSetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.SAdd", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) SIsmember(in *SSetRequest, out *SSetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.SIsmember", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) SRem(in *SSetRequest, out *SSetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.SRem", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) SCard(in *SMembersRequest, out *SSetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.SCard", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) LLpush(in *LSetRequest, out *LSetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.LLpush", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) LRpush(in *LSetRequest, out *LSetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.LRpush", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) LRange(in *LRangeRequest, out *HGetListResponse) error { |
|
|
|
|
|
return c.Call("RedisService.LRange", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) LLen(in *LLenRequest, out *LSetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.LLen", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) ReduceStock(in *SetRequest, out *SetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.ReduceStock", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) Incrby(in *AddRequest, out *AddResponse) error { |
|
|
|
|
|
return c.Call("RedisService.Incrby", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) Decrby(in *AddRequest, out *AddResponse) error { |
|
|
|
|
|
return c.Call("RedisService.Decrby", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) ZAdd(in *ZSetRequest, out *ZSetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.ZAdd", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) ZIncrBy(in *ZSetRequest, out *ZSetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.ZIncrBy", in, out) |
|
|
|
|
|
} |
|
|
|
|
|
func (c *RedisServiceClient) ZRange(in *ZRangeRequest, out *HGetListResponse) error { |
|
|
|
|
|
return c.Call("RedisService.ZRange", in, out) |
|
|
} |
|
|
} |
|
|
func (c *RedisServiceClient) GetByHashKey(in *GetHashKey, out *GetResponse) error { |
|
|
|
|
|
return c.Call("RedisService.GetByHashKey", in, out) |
|
|
|
|
|
|
|
|
func (c *RedisServiceClient) ZScan(in *ZScanRequest, out *HGetListResponse) error { |
|
|
|
|
|
return c.Call("RedisService.ZScan", in, out) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// DialRedisService connects to an RedisService at the specified network address.
|
|
|
// DialRedisService connects to an RedisService at the specified network address.
|
|
|