Browse Source

修改请求和返回数据类型

master v0.1.4
guzeng 3 years ago
parent
commit
0fd64fc8ac
3 changed files with 8 additions and 8 deletions
  1. +4
    -4
      redis.pb.go
  2. +2
    -2
      redis.proto
  3. +2
    -2
      string.go

+ 4
- 4
redis.pb.go View File

@ -195,7 +195,7 @@ func (m *GetStringResponse) GetValue() string {
// 设置key响应结构 // 设置key响应结构
type SetResponse struct { type SetResponse struct {
Ret *uint32 `protobuf:"varint,1,opt,name=ret" json:"ret,omitempty"`
Ret *uint64 `protobuf:"varint,1,opt,name=ret" json:"ret,omitempty"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
} }
@ -203,7 +203,7 @@ func (m *SetResponse) Reset() { *m = SetResponse{} }
func (m *SetResponse) String() string { return proto.CompactTextString(m) } func (m *SetResponse) String() string { return proto.CompactTextString(m) }
func (*SetResponse) ProtoMessage() {} func (*SetResponse) ProtoMessage() {}
func (m *SetResponse) GetRet() uint32 {
func (m *SetResponse) GetRet() uint64 {
if m != nil && m.Ret != nil { if m != nil && m.Ret != nil {
return *m.Ret return *m.Ret
} }
@ -212,7 +212,7 @@ func (m *SetResponse) GetRet() uint32 {
// 删除key响应结构 // 删除key响应结构
type DelResponse struct { type DelResponse struct {
Ret *uint32 `protobuf:"varint,1,opt,name=ret" json:"ret,omitempty"`
Ret *uint64 `protobuf:"varint,1,opt,name=ret" json:"ret,omitempty"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
} }
@ -220,7 +220,7 @@ func (m *DelResponse) Reset() { *m = DelResponse{} }
func (m *DelResponse) String() string { return proto.CompactTextString(m) } func (m *DelResponse) String() string { return proto.CompactTextString(m) }
func (*DelResponse) ProtoMessage() {} func (*DelResponse) ProtoMessage() {}
func (m *DelResponse) GetRet() uint32 {
func (m *DelResponse) GetRet() uint64 {
if m != nil && m.Ret != nil { if m != nil && m.Ret != nil {
return *m.Ret return *m.Ret
} }


+ 2
- 2
redis.proto View File

@ -39,12 +39,12 @@ message GetStringResponse {
// key响应结构 // key响应结构
message SetResponse { message SetResponse {
uint32 ret = 1;
uint64 ret = 1;
} }
// key响应结构 // key响应结构
message DelResponse { message DelResponse {
uint32 ret = 1;
uint64 ret = 1;
} }
// rpc方法 // rpc方法
service RedisService { service RedisService {


+ 2
- 2
string.go View File

@ -31,7 +31,7 @@ func GetString(key string, url ...string) (string, error) {
} }
//设置 //设置
func Set(key, value string, url ...string) (uint32, error) {
func Set(key, value string, url ...string) (uint64, error) {
conn, _, err := Conn(url...) conn, _, err := Conn(url...)
@ -54,7 +54,7 @@ func Set(key, value string, url ...string) (uint32, error) {
} }
//设置 //设置
func Del(key, value string, url ...string) (uint32, error) {
func Del(key, value string, url ...string) (uint64, error) {
conn, _, err := Conn(url...) conn, _, err := Conn(url...)


Loading…
Cancel
Save