diff --git a/pkg/proto/listx.pb.go b/pkg/proto/listx.pb.go index 160ceee..d35d853 100644 --- a/pkg/proto/listx.pb.go +++ b/pkg/proto/listx.pb.go @@ -25,7 +25,8 @@ type LindexRequest struct { sizeCache protoimpl.SizeCache 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"` + Index int32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` } func (x *LindexRequest) Reset() { @@ -67,10 +68,19 @@ func (x *LindexRequest) GetKey() *BaseKey { return nil } +func (x *LindexRequest) GetIndex() int32 { + if x != nil { + return x.Index + } + return 0 +} + type LindexResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Result string `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` } func (x *LindexResponse) Reset() { @@ -105,6 +115,13 @@ func (*LindexResponse) Descriptor() ([]byte, []int) { return file_listx_proto_rawDescGZIP(), []int{1} } +func (x *LindexResponse) GetResult() string { + if x != nil { + return x.Result + } + return "" +} + type LlenRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -156,6 +173,8 @@ type LlenResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Length int32 `protobuf:"varint,1,opt,name=length,proto3" json:"length,omitempty"` } func (x *LlenResponse) Reset() { @@ -190,12 +209,20 @@ func (*LlenResponse) Descriptor() ([]byte, []int) { return file_listx_proto_rawDescGZIP(), []int{3} } +func (x *LlenResponse) GetLength() int32 { + if x != nil { + return x.Length + } + return 0 +} + type LpopRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache 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"` + Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` } func (x *LpopRequest) Reset() { @@ -237,10 +264,19 @@ func (x *LpopRequest) GetKey() *BaseKey { return nil } +func (x *LpopRequest) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + type LpopResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Results []string `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"` } func (x *LpopResponse) Reset() { @@ -275,12 +311,20 @@ func (*LpopResponse) Descriptor() ([]byte, []int) { return file_listx_proto_rawDescGZIP(), []int{5} } +func (x *LpopResponse) GetResults() []string { + if x != nil { + return x.Results + } + return nil +} + type LpushRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache 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"` + Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` } func (x *LpushRequest) Reset() { @@ -322,6 +366,13 @@ func (x *LpushRequest) GetKey() *BaseKey { return nil } +func (x *LpushRequest) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + type LpushResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -365,7 +416,8 @@ type LpushxRequest struct { sizeCache protoimpl.SizeCache 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"` + Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` } func (x *LpushxRequest) Reset() { @@ -407,6 +459,13 @@ func (x *LpushxRequest) GetKey() *BaseKey { return nil } +func (x *LpushxRequest) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + type LpushxResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -450,7 +509,9 @@ type LrangeRequest struct { sizeCache protoimpl.SizeCache 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"` + Start int32 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` + End int32 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` } func (x *LrangeRequest) Reset() { @@ -492,10 +553,26 @@ func (x *LrangeRequest) GetKey() *BaseKey { return nil } +func (x *LrangeRequest) GetStart() int32 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *LrangeRequest) GetEnd() int32 { + if x != nil { + return x.End + } + return 0 +} + type LrangeResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` } func (x *LrangeResponse) Reset() { @@ -530,12 +607,22 @@ func (*LrangeResponse) Descriptor() ([]byte, []int) { return file_listx_proto_rawDescGZIP(), []int{11} } +func (x *LrangeResponse) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + type LremRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Key *BaseKey `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // count > 0 头搜索,count < 0 尾搜索 + Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` } func (x *LremRequest) Reset() { @@ -577,10 +664,26 @@ func (x *LremRequest) GetKey() *BaseKey { return nil } +func (x *LremRequest) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + +func (x *LremRequest) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + type LremResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Count int32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` } func (x *LremResponse) Reset() { @@ -615,12 +718,21 @@ func (*LremResponse) Descriptor() ([]byte, []int) { return file_listx_proto_rawDescGZIP(), []int{13} } +func (x *LremResponse) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + type LsetRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache 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"` + Index int32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` + Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` } func (x *LsetRequest) Reset() { @@ -662,6 +774,20 @@ func (x *LsetRequest) GetKey() *BaseKey { return nil } +func (x *LsetRequest) GetIndex() int32 { + if x != nil { + return x.Index + } + return 0 +} + +func (x *LsetRequest) GetValue() string { + if x != nil { + return x.Value + } + return "" +} + type LsetResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -705,7 +831,8 @@ type RpopRequest struct { sizeCache protoimpl.SizeCache 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"` + Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` } func (x *RpopRequest) Reset() { @@ -747,6 +874,13 @@ func (x *RpopRequest) GetKey() *BaseKey { return nil } +func (x *RpopRequest) GetCount() int32 { + if x != nil { + return x.Count + } + return 0 +} + type RpopResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -790,7 +924,9 @@ type LtrimRequest struct { sizeCache protoimpl.SizeCache 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"` + Start int32 `protobuf:"varint,2,opt,name=start,proto3" json:"start,omitempty"` + End int32 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"` } func (x *LtrimRequest) Reset() { @@ -832,6 +968,20 @@ func (x *LtrimRequest) GetKey() *BaseKey { return nil } +func (x *LtrimRequest) GetStart() int32 { + if x != nil { + return x.Start + } + return 0 +} + +func (x *LtrimRequest) GetEnd() int32 { + if x != nil { + return x.End + } + return 0 +} + type LtrimResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -875,7 +1025,8 @@ type RpushRequest struct { sizeCache protoimpl.SizeCache 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"` + Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` } func (x *RpushRequest) Reset() { @@ -917,6 +1068,13 @@ func (x *RpushRequest) GetKey() *BaseKey { return nil } +func (x *RpushRequest) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + type RpushResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -960,7 +1118,8 @@ type RpushxRequest struct { sizeCache protoimpl.SizeCache 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"` + Values []string `protobuf:"bytes,2,rep,name=values,proto3" json:"values,omitempty"` } func (x *RpushxRequest) Reset() { @@ -1002,6 +1161,13 @@ func (x *RpushxRequest) GetKey() *BaseKey { return nil } +func (x *RpushxRequest) GetValues() []string { + if x != nil { + return x.Values + } + return nil +} + type RpushxResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1044,54 +1210,82 @@ var File_listx_proto protoreflect.FileDescriptor var file_listx_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x6c, 0x69, 0x73, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0a, 0x62, - 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x2b, 0x0a, 0x0d, 0x4c, 0x69, 0x6e, + 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x0d, 0x4c, 0x69, 0x6e, 0x64, 0x65, 0x78, 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, 0x10, 0x0a, 0x0e, 0x4c, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x0b, 0x4c, 0x6c, 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, 0x0e, 0x0a, 0x0c, 0x4c, 0x6c, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x0b, 0x4c, 0x70, 0x6f, 0x70, 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, 0x0e, - 0x0a, 0x0c, 0x4c, 0x70, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, - 0x0a, 0x0c, 0x4c, 0x70, 0x75, 0x73, 0x68, 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, 0x0f, 0x0a, 0x0d, 0x4c, 0x70, - 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x0a, 0x0d, 0x4c, - 0x70, 0x75, 0x73, 0x68, 0x78, 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, 0x10, 0x0a, 0x0e, 0x4c, 0x70, 0x75, 0x73, - 0x68, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x0a, 0x0d, 0x4c, 0x72, - 0x61, 0x6e, 0x67, 0x65, 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, 0x10, 0x0a, 0x0e, 0x4c, 0x72, 0x61, 0x6e, 0x67, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x0b, 0x4c, 0x72, 0x65, - 0x6d, 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, 0x0e, 0x0a, 0x0c, 0x4c, 0x72, 0x65, 0x6d, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x0a, 0x0b, 0x4c, 0x73, 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, 0x22, - 0x0e, 0x0a, 0x0c, 0x4c, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x29, 0x0a, 0x0b, 0x52, 0x70, 0x6f, 0x70, 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, 0x0e, 0x0a, 0x0c, 0x52, 0x70, - 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x0c, 0x4c, 0x74, - 0x72, 0x69, 0x6d, 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, 0x0f, 0x0a, 0x0d, 0x4c, 0x74, 0x72, 0x69, 0x6d, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x0a, 0x0c, 0x52, 0x70, 0x75, 0x73, 0x68, - 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, 0x0f, 0x0a, 0x0d, 0x52, 0x70, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x0a, 0x0d, 0x52, 0x70, 0x75, 0x73, 0x68, 0x78, 0x52, 0x65, + 0x79, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x28, 0x0a, 0x0e, + 0x4c, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x29, 0x0a, 0x0b, 0x4c, 0x6c, 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, 0x10, 0x0a, 0x0e, 0x52, 0x70, 0x75, 0x73, 0x68, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x42, 0x0b, 0x5a, 0x09, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x79, 0x22, 0x26, 0x0a, 0x0c, 0x4c, 0x6c, 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, 0x3f, 0x0a, 0x0b, 0x4c, 0x70, 0x6f, + 0x70, 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, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x28, 0x0a, 0x0c, 0x4c, 0x70, + 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x72, 0x65, 0x73, + 0x75, 0x6c, 0x74, 0x73, 0x22, 0x42, 0x0a, 0x0c, 0x4c, 0x70, 0x75, 0x73, 0x68, 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, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x4c, 0x70, 0x75, 0x73, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x0a, 0x0d, 0x4c, 0x70, 0x75, + 0x73, 0x68, 0x78, 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, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x10, + 0x0a, 0x0e, 0x4c, 0x70, 0x75, 0x73, 0x68, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x53, 0x0a, 0x0d, 0x4c, 0x72, 0x61, 0x6e, 0x67, 0x65, 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, 0x14, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x28, 0x0a, 0x0e, 0x4c, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, + 0x55, 0x0a, 0x0b, 0x4c, 0x72, 0x65, 0x6d, 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, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x24, 0x0a, 0x0c, 0x4c, 0x72, 0x65, 0x6d, 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, 0x22, 0x55, 0x0a, 0x0b, + 0x4c, 0x73, 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, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x0e, 0x0a, 0x0c, 0x4c, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x0a, 0x0b, 0x52, 0x70, 0x6f, 0x70, 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, 0x14, + 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x0e, 0x0a, 0x0c, 0x52, 0x70, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x52, 0x0a, 0x0c, 0x4c, 0x74, 0x72, 0x69, 0x6d, 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, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6e, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x05, 0x52, 0x03, 0x65, 0x6e, 0x64, 0x22, 0x0f, 0x0a, 0x0d, 0x4c, 0x74, 0x72, 0x69, + 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x42, 0x0a, 0x0c, 0x52, 0x70, 0x75, + 0x73, 0x68, 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, 0x16, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x0f, 0x0a, + 0x0d, 0x52, 0x70, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, + 0x0a, 0x0d, 0x52, 0x70, 0x75, 0x73, 0x68, 0x78, 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, 0x16, 0x0a, 0x06, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x52, 0x70, 0x75, 0x73, 0x68, 0x78, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0b, 0x5a, 0x09, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/protobuf/listx.proto b/protobuf/listx.proto index b14c2e7..2a2e01a 100644 --- a/protobuf/listx.proto +++ b/protobuf/listx.proto @@ -4,9 +4,11 @@ option go_package = "pkg/proto"; message LindexRequest { BaseKey key = 1; + int32 index = 2; } message LindexResponse { + string result = 1; } message LlenRequest { @@ -14,17 +16,21 @@ message LlenRequest { } message LlenResponse { + int32 length = 1; } message LpopRequest { BaseKey key = 1; + int32 count = 2; } message LpopResponse { + repeated string results = 1; } message LpushRequest { BaseKey key = 1; + repeated string values = 2; } message LpushResponse { @@ -32,6 +38,7 @@ message LpushResponse { message LpushxRequest { BaseKey key = 1; + repeated string values = 2; } message LpushxResponse { @@ -39,20 +46,29 @@ message LpushxResponse { message LrangeRequest { BaseKey key = 1; + int32 start = 2; + int32 end = 3; } message LrangeResponse { + repeated string values = 2; } message LremRequest { BaseKey key = 1; + // count > 0 头搜索,count < 0 尾搜索 + int32 count = 2; + string value = 3; } message LremResponse { + int32 count = 1; } message LsetRequest { BaseKey key = 1; + int32 index = 2; + string value = 3; } message LsetResponse { @@ -60,6 +76,7 @@ message LsetResponse { message RpopRequest { BaseKey key = 1; + int32 count = 2; } message RpopResponse { @@ -67,6 +84,8 @@ message RpopResponse { message LtrimRequest { BaseKey key = 1; + int32 start = 2; + int32 end = 3; } message LtrimResponse { @@ -74,6 +93,7 @@ message LtrimResponse { message RpushRequest { BaseKey key = 1; + repeated string values = 2; } message RpushResponse { @@ -81,6 +101,7 @@ message RpushResponse { message RpushxRequest { BaseKey key = 1; + repeated string values = 2; } message RpushxResponse {