chore(service): update service
This commit is contained in:
parent
c3cff03b2b
commit
222bcc4eea
|
@ -172,6 +172,8 @@ type HExistsResponse struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HExistsResponse) Reset() {
|
func (x *HExistsResponse) Reset() {
|
||||||
|
@ -206,6 +208,13 @@ func (*HExistsResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_hashx_proto_rawDescGZIP(), []int{3}
|
return file_hashx_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *HExistsResponse) GetExists() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Exists
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
type HGetRequest struct {
|
type HGetRequest struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
|
@ -407,8 +416,9 @@ type HIncrByRequest struct {
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Key *BaseKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
Key *BaseKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
||||||
HKeys []string `protobuf:"bytes,2,rep,name=h_keys,json=hKeys,proto3" json:"h_keys,omitempty"`
|
HKeys []string `protobuf:"bytes,2,rep,name=h_keys,json=hKeys,proto3" json:"h_keys,omitempty"`
|
||||||
|
Renewal int32 `protobuf:"varint,3,opt,name=renewal,proto3" json:"renewal,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HIncrByRequest) Reset() {
|
func (x *HIncrByRequest) Reset() {
|
||||||
|
@ -457,12 +467,20 @@ func (x *HIncrByRequest) GetHKeys() []string {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *HIncrByRequest) GetRenewal() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Renewal
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
type HIncrByResponse struct {
|
type HIncrByResponse struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
Items map[string]string `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
|
||||||
|
Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HIncrByResponse) Reset() {
|
func (x *HIncrByResponse) Reset() {
|
||||||
|
@ -497,9 +515,16 @@ func (*HIncrByResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_hashx_proto_rawDescGZIP(), []int{9}
|
return file_hashx_proto_rawDescGZIP(), []int{9}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *HIncrByResponse) GetItems() map[string]string {
|
func (x *HIncrByResponse) GetCount() int32 {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Items
|
return x.Count
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *HIncrByResponse) GetValues() []string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Values
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -900,77 +925,76 @@ var file_hashx_proto_rawDesc = []byte{
|
||||||
0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a,
|
0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a,
|
||||||
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x73,
|
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x73,
|
||||||
0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x13, 0x0a, 0x05, 0x68, 0x5f, 0x6b,
|
0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x13, 0x0a, 0x05, 0x68, 0x5f, 0x6b,
|
||||||
0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x4b, 0x65, 0x79, 0x22, 0x11,
|
0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x4b, 0x65, 0x79, 0x22, 0x29,
|
||||||
0x0a, 0x0f, 0x48, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
0x0a, 0x0f, 0x48, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
0x65, 0x22, 0x40, 0x0a, 0x0b, 0x48, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||||
0x12, 0x1a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e,
|
0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x40, 0x0a, 0x0b, 0x48, 0x47, 0x65,
|
||||||
0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06,
|
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18,
|
||||||
0x68, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x68, 0x4b,
|
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x52,
|
||||||
0x65, 0x79, 0x73, 0x22, 0x78, 0x0a, 0x0c, 0x48, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
0x03, 0x6b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02,
|
||||||
0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03,
|
0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x78, 0x0a, 0x0c, 0x48,
|
||||||
0x28, 0x0b, 0x32, 0x18, 0x2e, 0x48, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2e, 0x0a, 0x05, 0x69,
|
||||||
0x65, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74,
|
0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x48, 0x47, 0x65,
|
||||||
0x65, 0x6d, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72,
|
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45,
|
||||||
0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x49,
|
||||||
0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01,
|
0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79,
|
||||||
0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2c, 0x0a,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76,
|
||||||
0x0e, 0x48, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75,
|
||||||
0x1a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42,
|
0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2c, 0x0a, 0x0e, 0x48, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c,
|
||||||
0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x7e, 0x0a, 0x0f, 0x48,
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||||
0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31,
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x03,
|
||||||
0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e,
|
0x6b, 0x65, 0x79, 0x22, 0x7e, 0x0a, 0x0f, 0x48, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65,
|
||||||
0x48, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e,
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18,
|
||||||
0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d,
|
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x48, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52,
|
||||||
0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74,
|
||||||
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
|
0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65,
|
||||||
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||||
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x43, 0x0a, 0x0e, 0x48,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||||
0x49, 0x6e, 0x63, 0x72, 0x42, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a,
|
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
|
||||||
|
0x02, 0x38, 0x01, 0x22, 0x5d, 0x0a, 0x0e, 0x48, 0x49, 0x6e, 0x63, 0x72, 0x42, 0x79, 0x52, 0x65,
|
||||||
|
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||||
|
0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65,
|
||||||
|
0x79, 0x12, 0x15, 0x0a, 0x06, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||||
|
0x09, 0x52, 0x05, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x6e, 0x65,
|
||||||
|
0x77, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x72, 0x65, 0x6e, 0x65, 0x77,
|
||||||
|
0x61, 0x6c, 0x22, 0x3f, 0x0a, 0x0f, 0x48, 0x49, 0x6e, 0x63, 0x72, 0x42, 0x79, 0x52, 0x65, 0x73,
|
||||||
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x76,
|
||||||
|
0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c,
|
||||||
|
0x75, 0x65, 0x73, 0x22, 0x2a, 0x0a, 0x0c, 0x48, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||||
|
0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||||
|
0x32, 0x08, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22,
|
||||||
|
0x23, 0x0a, 0x0d, 0x48, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||||
|
0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04,
|
||||||
|
0x6b, 0x65, 0x79, 0x73, 0x22, 0x29, 0x0a, 0x0b, 0x48, 0x4c, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75,
|
||||||
|
0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
|
||||||
|
0x32, 0x08, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22,
|
||||||
|
0x26, 0x0a, 0x0c, 0x48, 0x4c, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
|
||||||
|
0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||||
|
0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x92, 0x01, 0x0a, 0x0b, 0x48, 0x53, 0x65, 0x74,
|
||||||
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||||
|
0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x03,
|
||||||
|
0x6b, 0x65, 0x79, 0x12, 0x2d, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03,
|
||||||
|
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x48, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||||
|
0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65,
|
||||||
|
0x6d, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
|
||||||
|
0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b,
|
||||||
|
0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||||
|
0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x0e, 0x0a, 0x0c,
|
||||||
|
0x48, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x94, 0x01, 0x0a,
|
||||||
|
0x0c, 0x48, 0x53, 0x65, 0x74, 0x58, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a,
|
||||||
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x73,
|
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x73,
|
||||||
0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x68, 0x5f, 0x6b,
|
0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x69, 0x74, 0x65,
|
||||||
0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x68, 0x4b, 0x65, 0x79, 0x73,
|
0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x48, 0x53, 0x65, 0x74, 0x58,
|
||||||
0x22, 0x7e, 0x0a, 0x0f, 0x48, 0x49, 0x6e, 0x63, 0x72, 0x42, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74,
|
||||||
0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03,
|
0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65,
|
||||||
0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x48, 0x49, 0x6e, 0x63, 0x72, 0x42, 0x79, 0x52, 0x65, 0x73, 0x70,
|
0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
|
||||||
0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
|
||||||
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45,
|
0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a,
|
||||||
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
0x02, 0x38, 0x01, 0x22, 0x25, 0x0a, 0x0d, 0x48, 0x53, 0x65, 0x74, 0x58, 0x52, 0x65, 0x73, 0x70,
|
||||||
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
|
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
|
0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0b, 0x5a, 0x09, 0x70, 0x6b,
|
||||||
0x22, 0x2a, 0x0a, 0x0c, 0x48, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x12, 0x1a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e,
|
|
||||||
0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x23, 0x0a, 0x0d,
|
|
||||||
0x48, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a,
|
|
||||||
0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79,
|
|
||||||
0x73, 0x22, 0x29, 0x0a, 0x0b, 0x48, 0x4c, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
|
||||||
0x12, 0x1a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e,
|
|
||||||
0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x26, 0x0a, 0x0c,
|
|
||||||
0x48, 0x4c, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06,
|
|
||||||
0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6c, 0x65,
|
|
||||||
0x6e, 0x67, 0x74, 0x68, 0x22, 0x92, 0x01, 0x0a, 0x0b, 0x48, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71,
|
|
||||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
||||||
0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4b, 0x65, 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
|
||||||
0x12, 0x2d, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
|
||||||
0x17, 0x2e, 0x48, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x74,
|
|
||||||
0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a,
|
|
||||||
0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a,
|
|
||||||
0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12,
|
|
||||||
0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
|
|
||||||
0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x0e, 0x0a, 0x0c, 0x48, 0x53, 0x65,
|
|
||||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x0c, 0x48, 0x53,
|
|
||||||
0x65, 0x74, 0x58, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x03, 0x6b, 0x65,
|
|
||||||
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x08, 0x2e, 0x42, 0x61, 0x73, 0x65, 0x4b, 0x65,
|
|
||||||
0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18,
|
|
||||||
0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x48, 0x53, 0x65, 0x74, 0x58, 0x52, 0x65, 0x71,
|
|
||||||
0x75, 0x65, 0x73, 0x74, 0x2e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
|
|
||||||
0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x45,
|
|
||||||
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
|
|
||||||
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
|
|
||||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
|
|
||||||
0x22, 0x25, 0x0a, 0x0d, 0x48, 0x53, 0x65, 0x74, 0x58, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
|
||||||
0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05,
|
|
||||||
0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x0b, 0x5a, 0x09, 0x70, 0x6b, 0x67, 0x2f, 0x70,
|
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -985,7 +1009,7 @@ func file_hashx_proto_rawDescGZIP() []byte {
|
||||||
return file_hashx_proto_rawDescData
|
return file_hashx_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_hashx_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
|
var file_hashx_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
|
||||||
var file_hashx_proto_goTypes = []interface{}{
|
var file_hashx_proto_goTypes = []interface{}{
|
||||||
(*HDelRequest)(nil), // 0: HDelRequest
|
(*HDelRequest)(nil), // 0: HDelRequest
|
||||||
(*HDelResponse)(nil), // 1: HDelResponse
|
(*HDelResponse)(nil), // 1: HDelResponse
|
||||||
|
@ -1007,31 +1031,29 @@ var file_hashx_proto_goTypes = []interface{}{
|
||||||
(*HSetXResponse)(nil), // 17: HSetXResponse
|
(*HSetXResponse)(nil), // 17: HSetXResponse
|
||||||
nil, // 18: HGetResponse.ItemsEntry
|
nil, // 18: HGetResponse.ItemsEntry
|
||||||
nil, // 19: HGetAllResponse.ItemsEntry
|
nil, // 19: HGetAllResponse.ItemsEntry
|
||||||
nil, // 20: HIncrByResponse.ItemsEntry
|
nil, // 20: HSetRequest.ItemsEntry
|
||||||
nil, // 21: HSetRequest.ItemsEntry
|
nil, // 21: HSetXRequest.ItemsEntry
|
||||||
nil, // 22: HSetXRequest.ItemsEntry
|
(*BaseKey)(nil), // 22: BaseKey
|
||||||
(*BaseKey)(nil), // 23: BaseKey
|
|
||||||
}
|
}
|
||||||
var file_hashx_proto_depIdxs = []int32{
|
var file_hashx_proto_depIdxs = []int32{
|
||||||
23, // 0: HDelRequest.key:type_name -> BaseKey
|
22, // 0: HDelRequest.key:type_name -> BaseKey
|
||||||
23, // 1: HExistsRequest.key:type_name -> BaseKey
|
22, // 1: HExistsRequest.key:type_name -> BaseKey
|
||||||
23, // 2: HGetRequest.key:type_name -> BaseKey
|
22, // 2: HGetRequest.key:type_name -> BaseKey
|
||||||
18, // 3: HGetResponse.items:type_name -> HGetResponse.ItemsEntry
|
18, // 3: HGetResponse.items:type_name -> HGetResponse.ItemsEntry
|
||||||
23, // 4: HGetAllRequest.key:type_name -> BaseKey
|
22, // 4: HGetAllRequest.key:type_name -> BaseKey
|
||||||
19, // 5: HGetAllResponse.items:type_name -> HGetAllResponse.ItemsEntry
|
19, // 5: HGetAllResponse.items:type_name -> HGetAllResponse.ItemsEntry
|
||||||
23, // 6: HIncrByRequest.key:type_name -> BaseKey
|
22, // 6: HIncrByRequest.key:type_name -> BaseKey
|
||||||
20, // 7: HIncrByResponse.items:type_name -> HIncrByResponse.ItemsEntry
|
22, // 7: HKeysRequest.key:type_name -> BaseKey
|
||||||
23, // 8: HKeysRequest.key:type_name -> BaseKey
|
22, // 8: HLenRequest.key:type_name -> BaseKey
|
||||||
23, // 9: HLenRequest.key:type_name -> BaseKey
|
22, // 9: HSetRequest.key:type_name -> BaseKey
|
||||||
23, // 10: HSetRequest.key:type_name -> BaseKey
|
20, // 10: HSetRequest.items:type_name -> HSetRequest.ItemsEntry
|
||||||
21, // 11: HSetRequest.items:type_name -> HSetRequest.ItemsEntry
|
22, // 11: HSetXRequest.key:type_name -> BaseKey
|
||||||
23, // 12: HSetXRequest.key:type_name -> BaseKey
|
21, // 12: HSetXRequest.items:type_name -> HSetXRequest.ItemsEntry
|
||||||
22, // 13: HSetXRequest.items:type_name -> HSetXRequest.ItemsEntry
|
13, // [13:13] is the sub-list for method output_type
|
||||||
14, // [14:14] is the sub-list for method output_type
|
13, // [13:13] is the sub-list for method input_type
|
||||||
14, // [14:14] is the sub-list for method input_type
|
13, // [13:13] is the sub-list for extension type_name
|
||||||
14, // [14:14] is the sub-list for extension type_name
|
13, // [13:13] is the sub-list for extension extendee
|
||||||
14, // [14:14] is the sub-list for extension extendee
|
0, // [0:13] is the sub-list for field type_name
|
||||||
0, // [0:14] is the sub-list for field type_name
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_hashx_proto_init() }
|
func init() { file_hashx_proto_init() }
|
||||||
|
@ -1264,7 +1286,7 @@ func file_hashx_proto_init() {
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_hashx_proto_rawDesc,
|
RawDescriptor: file_hashx_proto_rawDesc,
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 23,
|
NumMessages: 22,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
|
|
@ -16,6 +16,7 @@ message HExistsRequest {
|
||||||
}
|
}
|
||||||
|
|
||||||
message HExistsResponse {
|
message HExistsResponse {
|
||||||
|
bool exists = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message HGetRequest {
|
message HGetRequest {
|
||||||
|
@ -38,10 +39,12 @@ message HGetAllResponse {
|
||||||
message HIncrByRequest {
|
message HIncrByRequest {
|
||||||
BaseKey key = 1;
|
BaseKey key = 1;
|
||||||
repeated string h_keys = 2;
|
repeated string h_keys = 2;
|
||||||
|
int32 renewal = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message HIncrByResponse {
|
message HIncrByResponse {
|
||||||
map<string, string> items = 1;
|
int32 count = 1;
|
||||||
|
repeated string values = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message HKeysRequest {
|
message HKeysRequest {
|
||||||
|
|
|
@ -72,7 +72,7 @@ func (d *Dao) ExecMessage(message protobuf.Message) error {
|
||||||
_, err := d.HGetAll(req.Key)
|
_, err := d.HGetAll(req.Key)
|
||||||
return err
|
return err
|
||||||
case *proto.HIncrByRequest:
|
case *proto.HIncrByRequest:
|
||||||
_, err := d.HIncrBy(req.Key, req.HKeys)
|
_, err := d.HIncrBy(req.Key, req.HKeys, req.Renewal)
|
||||||
return err
|
return err
|
||||||
case *proto.HKeysRequest:
|
case *proto.HKeysRequest:
|
||||||
_, err := d.HKeys(req.Key)
|
_, err := d.HKeys(req.Key)
|
||||||
|
|
|
@ -25,7 +25,7 @@ type Interface interface {
|
||||||
HExists(*proto.BaseKey, string) (*proto.HExistsResponse, error)
|
HExists(*proto.BaseKey, string) (*proto.HExistsResponse, error)
|
||||||
HGet(*proto.BaseKey, []string) (*proto.HGetResponse, error)
|
HGet(*proto.BaseKey, []string) (*proto.HGetResponse, error)
|
||||||
HGetAll(*proto.BaseKey) (*proto.HGetAllResponse, error)
|
HGetAll(*proto.BaseKey) (*proto.HGetAllResponse, error)
|
||||||
HIncrBy(*proto.BaseKey, []string) (*proto.HIncrByResponse, error)
|
HIncrBy(*proto.BaseKey, []string, int32) (*proto.HIncrByResponse, error)
|
||||||
HKeys(*proto.BaseKey) (*proto.HKeysResponse, error)
|
HKeys(*proto.BaseKey) (*proto.HKeysResponse, error)
|
||||||
HLen(*proto.BaseKey) (*proto.HLenResponse, error)
|
HLen(*proto.BaseKey) (*proto.HLenResponse, error)
|
||||||
HSet(*proto.BaseKey, map[string]string) (*proto.HSetResponse, error)
|
HSet(*proto.BaseKey, map[string]string) (*proto.HSetResponse, error)
|
||||||
|
|
|
@ -463,7 +463,7 @@ func (s *singleService) HIncrBy(
|
||||||
req *proto.HIncrByRequest,
|
req *proto.HIncrByRequest,
|
||||||
) (*proto.HIncrByResponse, error) {
|
) (*proto.HIncrByResponse, error) {
|
||||||
work := event.EventWorkFunc(func() (interface{}, error) {
|
work := event.EventWorkFunc(func() (interface{}, error) {
|
||||||
resp, err := s.dao.HIncrBy(req.Key, req.HKeys)
|
resp, err := s.dao.HIncrBy(req.Key, req.HKeys, req.Renewal)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue