chore(proto): update proto

This commit is contained in:
bandl 2021-11-04 19:20:10 +08:00
parent 344c136586
commit 88774daede
6 changed files with 1887 additions and 105 deletions

1279
pkg/proto/hashx.pb.go Normal file

File diff suppressed because it is too large Load Diff

View File

@ -31,65 +31,88 @@ var File_storage_proto protoreflect.FileDescriptor
var file_storage_proto_rawDesc = []byte{
0x0a, 0x0d, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b,
0x6c, 0x69, 0x73, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xff, 0x06, 0x0a, 0x0a,
0x43, 0x6f, 0x6d, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x03, 0x53, 0x65,
0x74, 0x12, 0x0b, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c,
0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x03,
0x47, 0x65, 0x74, 0x12, 0x0b, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x0c, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20,
0x0a, 0x03, 0x41, 0x64, 0x64, 0x12, 0x0b, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x29, 0x0a, 0x06, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x12, 0x0e, 0x2e, 0x52, 0x65, 0x64,
0x75, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x52, 0x65, 0x64,
0x75, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x53,
0x65, 0x74, 0x42, 0x69, 0x74, 0x12, 0x0e, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x69, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x69, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x42, 0x69, 0x74,
0x12, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x0f, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x2f, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, 0x2e,
0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x11, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x2e, 0x47,
0x65, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x47,
0x65, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a,
0x06, 0x53, 0x74, 0x72, 0x4c, 0x65, 0x6e, 0x12, 0x0e, 0x2e, 0x53, 0x74, 0x72, 0x4c, 0x65, 0x6e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x53, 0x74, 0x72, 0x4c, 0x65, 0x6e,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x53, 0x65, 0x74, 0x6e,
0x78, 0x12, 0x0d, 0x2e, 0x53, 0x65, 0x74, 0x6e, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x0e, 0x2e, 0x53, 0x65, 0x74, 0x6e, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x29, 0x0a, 0x06, 0x4c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x0e, 0x2e, 0x4c, 0x49, 0x6e,
0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x4c, 0x49, 0x6e,
0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x4c,
0x4c, 0x65, 0x6e, 0x12, 0x0c, 0x2e, 0x4c, 0x4c, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x0d, 0x2e, 0x4c, 0x4c, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x23, 0x0a, 0x04, 0x4c, 0x50, 0x6f, 0x70, 0x12, 0x0c, 0x2e, 0x4c, 0x50, 0x6f, 0x70, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x4c, 0x50, 0x6f, 0x70, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x4c, 0x50, 0x75, 0x73, 0x68, 0x12, 0x0d,
0x2e, 0x4c, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e,
0x4c, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a,
0x06, 0x4c, 0x50, 0x75, 0x73, 0x68, 0x58, 0x12, 0x0e, 0x2e, 0x4c, 0x50, 0x75, 0x73, 0x68, 0x58,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x4c, 0x50, 0x75, 0x73, 0x68, 0x58,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x4c, 0x52, 0x61, 0x6e,
0x67, 0x65, 0x12, 0x0e, 0x2e, 0x4c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x4c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x4c, 0x52, 0x65, 0x6d, 0x12, 0x0c, 0x2e, 0x4c, 0x52,
0x65, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x4c, 0x52, 0x65, 0x6d,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x4c, 0x53, 0x65, 0x74,
0x12, 0x0c, 0x2e, 0x4c, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d,
0x2e, 0x4c, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a,
0x04, 0x52, 0x50, 0x6f, 0x70, 0x12, 0x0c, 0x2e, 0x52, 0x50, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x52, 0x50, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x4c, 0x54, 0x72, 0x69, 0x6d, 0x12, 0x0d, 0x2e, 0x4c, 0x54,
0x72, 0x69, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x4c, 0x54, 0x72,
0x69, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x52, 0x50,
0x75, 0x73, 0x68, 0x12, 0x0d, 0x2e, 0x52, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x52, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x52, 0x50, 0x75, 0x73, 0x68, 0x58, 0x12, 0x0e, 0x2e, 0x52,
0x50, 0x75, 0x73, 0x68, 0x58, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x52,
0x50, 0x75, 0x73, 0x68, 0x58, 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,
0x6c, 0x69, 0x73, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x68, 0x61, 0x73,
0x68, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xed, 0x09, 0x0a, 0x0a, 0x43, 0x6f, 0x6d,
0x6d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x03, 0x53, 0x65, 0x74, 0x12, 0x0b,
0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e, 0x53, 0x65,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x03, 0x47, 0x65, 0x74,
0x12, 0x0b, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0c, 0x2e,
0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x03, 0x41,
0x64, 0x64, 0x12, 0x0b, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0c, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a,
0x06, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x12, 0x0e, 0x2e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x53, 0x65, 0x74, 0x42,
0x69, 0x74, 0x12, 0x0e, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x53, 0x65, 0x74, 0x42, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x42, 0x69, 0x74, 0x12, 0x0e, 0x2e,
0x47, 0x65, 0x74, 0x42, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e,
0x47, 0x65, 0x74, 0x42, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f,
0x0a, 0x08, 0x47, 0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x10, 0x2e, 0x47, 0x65, 0x74,
0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x47,
0x65, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x29, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x2e, 0x47, 0x65, 0x74, 0x53,
0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x47, 0x65, 0x74, 0x53,
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x53, 0x74,
0x72, 0x4c, 0x65, 0x6e, 0x12, 0x0e, 0x2e, 0x53, 0x74, 0x72, 0x4c, 0x65, 0x6e, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x53, 0x74, 0x72, 0x4c, 0x65, 0x6e, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x53, 0x65, 0x74, 0x6e, 0x78, 0x12, 0x0d,
0x2e, 0x53, 0x65, 0x74, 0x6e, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e,
0x53, 0x65, 0x74, 0x6e, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a,
0x06, 0x4c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x0e, 0x2e, 0x4c, 0x49, 0x6e, 0x64, 0x65, 0x78,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x4c, 0x49, 0x6e, 0x64, 0x65, 0x78,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x4c, 0x4c, 0x65, 0x6e,
0x12, 0x0c, 0x2e, 0x4c, 0x4c, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d,
0x2e, 0x4c, 0x4c, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a,
0x04, 0x4c, 0x50, 0x6f, 0x70, 0x12, 0x0c, 0x2e, 0x4c, 0x50, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x4c, 0x50, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x4c, 0x50, 0x75, 0x73, 0x68, 0x12, 0x0d, 0x2e, 0x4c, 0x50,
0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x4c, 0x50, 0x75,
0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x4c, 0x50,
0x75, 0x73, 0x68, 0x58, 0x12, 0x0e, 0x2e, 0x4c, 0x50, 0x75, 0x73, 0x68, 0x58, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x4c, 0x50, 0x75, 0x73, 0x68, 0x58, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x4c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x12,
0x0e, 0x2e, 0x4c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0f, 0x2e, 0x4c, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x23, 0x0a, 0x04, 0x4c, 0x52, 0x65, 0x6d, 0x12, 0x0c, 0x2e, 0x4c, 0x52, 0x65, 0x6d, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x4c, 0x52, 0x65, 0x6d, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x4c, 0x53, 0x65, 0x74, 0x12, 0x0c, 0x2e,
0x4c, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x4c, 0x53,
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x52, 0x50,
0x6f, 0x70, 0x12, 0x0c, 0x2e, 0x52, 0x50, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x0d, 0x2e, 0x52, 0x50, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x26, 0x0a, 0x05, 0x4c, 0x54, 0x72, 0x69, 0x6d, 0x12, 0x0d, 0x2e, 0x4c, 0x54, 0x72, 0x69, 0x6d,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x4c, 0x54, 0x72, 0x69, 0x6d, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x05, 0x52, 0x50, 0x75, 0x73, 0x68,
0x12, 0x0d, 0x2e, 0x52, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x0e, 0x2e, 0x52, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x29, 0x0a, 0x06, 0x52, 0x50, 0x75, 0x73, 0x68, 0x58, 0x12, 0x0e, 0x2e, 0x52, 0x50, 0x75, 0x73,
0x68, 0x58, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0f, 0x2e, 0x52, 0x50, 0x75, 0x73,
0x68, 0x58, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x48, 0x44,
0x65, 0x6c, 0x12, 0x0c, 0x2e, 0x48, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x0d, 0x2e, 0x48, 0x44, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x2c, 0x0a, 0x07, 0x48, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x0f, 0x2e, 0x48, 0x45, 0x78,
0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x48, 0x45,
0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a,
0x04, 0x48, 0x47, 0x65, 0x74, 0x12, 0x0c, 0x2e, 0x48, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x48, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x48, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x12, 0x0f, 0x2e,
0x48, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10,
0x2e, 0x48, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x2c, 0x0a, 0x07, 0x48, 0x49, 0x6e, 0x63, 0x72, 0x42, 0x79, 0x12, 0x0f, 0x2e, 0x48, 0x49,
0x6e, 0x63, 0x72, 0x42, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x48,
0x49, 0x6e, 0x63, 0x72, 0x42, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26,
0x0a, 0x05, 0x48, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x0d, 0x2e, 0x48, 0x4b, 0x65, 0x79, 0x73, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x48, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x48, 0x4c, 0x65, 0x6e, 0x12, 0x0c,
0x2e, 0x48, 0x4c, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0d, 0x2e, 0x48,
0x4c, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x48,
0x53, 0x65, 0x74, 0x12, 0x0c, 0x2e, 0x48, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x0d, 0x2e, 0x48, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x26, 0x0a, 0x05, 0x48, 0x53, 0x65, 0x74, 0x58, 0x12, 0x0d, 0x2e, 0x48, 0x53, 0x65, 0x74,
0x58, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x48, 0x53, 0x65, 0x74, 0x58,
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 file_storage_proto_goTypes = []interface{}{
@ -115,28 +138,46 @@ var file_storage_proto_goTypes = []interface{}{
(*LTrimRequest)(nil), // 19: LTrimRequest
(*RPushRequest)(nil), // 20: RPushRequest
(*RPushXRequest)(nil), // 21: RPushXRequest
(*SetResponse)(nil), // 22: SetResponse
(*GetResponse)(nil), // 23: GetResponse
(*AddResponse)(nil), // 24: AddResponse
(*ReduceResponse)(nil), // 25: ReduceResponse
(*SetBitResponse)(nil), // 26: SetBitResponse
(*GetBitResponse)(nil), // 27: GetBitResponse
(*GetRangeResponse)(nil), // 28: GetRangeResponse
(*GetSetResponse)(nil), // 29: GetSetResponse
(*StrLenResponse)(nil), // 30: StrLenResponse
(*SetnxResponse)(nil), // 31: SetnxResponse
(*LIndexResponse)(nil), // 32: LIndexResponse
(*LLenResponse)(nil), // 33: LLenResponse
(*LPopResponse)(nil), // 34: LPopResponse
(*LPushResponse)(nil), // 35: LPushResponse
(*LPushXResponse)(nil), // 36: LPushXResponse
(*LRangeResponse)(nil), // 37: LRangeResponse
(*LRemResponse)(nil), // 38: LRemResponse
(*LSetResponse)(nil), // 39: LSetResponse
(*RPopResponse)(nil), // 40: RPopResponse
(*LTrimResponse)(nil), // 41: LTrimResponse
(*RPushResponse)(nil), // 42: RPushResponse
(*RPushXResponse)(nil), // 43: RPushXResponse
(*HDelRequest)(nil), // 22: HDelRequest
(*HExistsRequest)(nil), // 23: HExistsRequest
(*HGetRequest)(nil), // 24: HGetRequest
(*HGetAllRequest)(nil), // 25: HGetAllRequest
(*HIncrByRequest)(nil), // 26: HIncrByRequest
(*HKeysRequest)(nil), // 27: HKeysRequest
(*HLenRequest)(nil), // 28: HLenRequest
(*HSetRequest)(nil), // 29: HSetRequest
(*HSetXRequest)(nil), // 30: HSetXRequest
(*SetResponse)(nil), // 31: SetResponse
(*GetResponse)(nil), // 32: GetResponse
(*AddResponse)(nil), // 33: AddResponse
(*ReduceResponse)(nil), // 34: ReduceResponse
(*SetBitResponse)(nil), // 35: SetBitResponse
(*GetBitResponse)(nil), // 36: GetBitResponse
(*GetRangeResponse)(nil), // 37: GetRangeResponse
(*GetSetResponse)(nil), // 38: GetSetResponse
(*StrLenResponse)(nil), // 39: StrLenResponse
(*SetnxResponse)(nil), // 40: SetnxResponse
(*LIndexResponse)(nil), // 41: LIndexResponse
(*LLenResponse)(nil), // 42: LLenResponse
(*LPopResponse)(nil), // 43: LPopResponse
(*LPushResponse)(nil), // 44: LPushResponse
(*LPushXResponse)(nil), // 45: LPushXResponse
(*LRangeResponse)(nil), // 46: LRangeResponse
(*LRemResponse)(nil), // 47: LRemResponse
(*LSetResponse)(nil), // 48: LSetResponse
(*RPopResponse)(nil), // 49: RPopResponse
(*LTrimResponse)(nil), // 50: LTrimResponse
(*RPushResponse)(nil), // 51: RPushResponse
(*RPushXResponse)(nil), // 52: RPushXResponse
(*HDelResponse)(nil), // 53: HDelResponse
(*HExistsResponse)(nil), // 54: HExistsResponse
(*HGetResponse)(nil), // 55: HGetResponse
(*HGetAllResponse)(nil), // 56: HGetAllResponse
(*HIncrByResponse)(nil), // 57: HIncrByResponse
(*HKeysResponse)(nil), // 58: HKeysResponse
(*HLenResponse)(nil), // 59: HLenResponse
(*HSetResponse)(nil), // 60: HSetResponse
(*HSetXResponse)(nil), // 61: HSetXResponse
}
var file_storage_proto_depIdxs = []int32{
0, // 0: CommServer.Set:input_type -> SetRequest
@ -161,30 +202,48 @@ var file_storage_proto_depIdxs = []int32{
19, // 19: CommServer.LTrim:input_type -> LTrimRequest
20, // 20: CommServer.RPush:input_type -> RPushRequest
21, // 21: CommServer.RPushX:input_type -> RPushXRequest
22, // 22: CommServer.Set:output_type -> SetResponse
23, // 23: CommServer.Get:output_type -> GetResponse
24, // 24: CommServer.Add:output_type -> AddResponse
25, // 25: CommServer.Reduce:output_type -> ReduceResponse
26, // 26: CommServer.SetBit:output_type -> SetBitResponse
27, // 27: CommServer.GetBit:output_type -> GetBitResponse
28, // 28: CommServer.GetRange:output_type -> GetRangeResponse
29, // 29: CommServer.GetSet:output_type -> GetSetResponse
30, // 30: CommServer.StrLen:output_type -> StrLenResponse
31, // 31: CommServer.Setnx:output_type -> SetnxResponse
32, // 32: CommServer.LIndex:output_type -> LIndexResponse
33, // 33: CommServer.LLen:output_type -> LLenResponse
34, // 34: CommServer.LPop:output_type -> LPopResponse
35, // 35: CommServer.LPush:output_type -> LPushResponse
36, // 36: CommServer.LPushX:output_type -> LPushXResponse
37, // 37: CommServer.LRange:output_type -> LRangeResponse
38, // 38: CommServer.LRem:output_type -> LRemResponse
39, // 39: CommServer.LSet:output_type -> LSetResponse
40, // 40: CommServer.RPop:output_type -> RPopResponse
41, // 41: CommServer.LTrim:output_type -> LTrimResponse
42, // 42: CommServer.RPush:output_type -> RPushResponse
43, // 43: CommServer.RPushX:output_type -> RPushXResponse
22, // [22:44] is the sub-list for method output_type
0, // [0:22] is the sub-list for method input_type
22, // 22: CommServer.HDel:input_type -> HDelRequest
23, // 23: CommServer.HExists:input_type -> HExistsRequest
24, // 24: CommServer.HGet:input_type -> HGetRequest
25, // 25: CommServer.HGetAll:input_type -> HGetAllRequest
26, // 26: CommServer.HIncrBy:input_type -> HIncrByRequest
27, // 27: CommServer.HKeys:input_type -> HKeysRequest
28, // 28: CommServer.HLen:input_type -> HLenRequest
29, // 29: CommServer.HSet:input_type -> HSetRequest
30, // 30: CommServer.HSetX:input_type -> HSetXRequest
31, // 31: CommServer.Set:output_type -> SetResponse
32, // 32: CommServer.Get:output_type -> GetResponse
33, // 33: CommServer.Add:output_type -> AddResponse
34, // 34: CommServer.Reduce:output_type -> ReduceResponse
35, // 35: CommServer.SetBit:output_type -> SetBitResponse
36, // 36: CommServer.GetBit:output_type -> GetBitResponse
37, // 37: CommServer.GetRange:output_type -> GetRangeResponse
38, // 38: CommServer.GetSet:output_type -> GetSetResponse
39, // 39: CommServer.StrLen:output_type -> StrLenResponse
40, // 40: CommServer.Setnx:output_type -> SetnxResponse
41, // 41: CommServer.LIndex:output_type -> LIndexResponse
42, // 42: CommServer.LLen:output_type -> LLenResponse
43, // 43: CommServer.LPop:output_type -> LPopResponse
44, // 44: CommServer.LPush:output_type -> LPushResponse
45, // 45: CommServer.LPushX:output_type -> LPushXResponse
46, // 46: CommServer.LRange:output_type -> LRangeResponse
47, // 47: CommServer.LRem:output_type -> LRemResponse
48, // 48: CommServer.LSet:output_type -> LSetResponse
49, // 49: CommServer.RPop:output_type -> RPopResponse
50, // 50: CommServer.LTrim:output_type -> LTrimResponse
51, // 51: CommServer.RPush:output_type -> RPushResponse
52, // 52: CommServer.RPushX:output_type -> RPushXResponse
53, // 53: CommServer.HDel:output_type -> HDelResponse
54, // 54: CommServer.HExists:output_type -> HExistsResponse
55, // 55: CommServer.HGet:output_type -> HGetResponse
56, // 56: CommServer.HGetAll:output_type -> HGetAllResponse
57, // 57: CommServer.HIncrBy:output_type -> HIncrByResponse
58, // 58: CommServer.HKeys:output_type -> HKeysResponse
59, // 59: CommServer.HLen:output_type -> HLenResponse
60, // 60: CommServer.HSet:output_type -> HSetResponse
61, // 61: CommServer.HSetX:output_type -> HSetXResponse
31, // [31:62] is the sub-list for method output_type
0, // [0:31] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
@ -197,6 +256,7 @@ func file_storage_proto_init() {
}
file_stringx_proto_init()
file_listx_proto_init()
file_hashx_proto_init()
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
@ -250,6 +310,15 @@ type CommServerClient interface {
LTrim(ctx context.Context, in *LTrimRequest, opts ...grpc.CallOption) (*LTrimResponse, error)
RPush(ctx context.Context, in *RPushRequest, opts ...grpc.CallOption) (*RPushResponse, error)
RPushX(ctx context.Context, in *RPushXRequest, opts ...grpc.CallOption) (*RPushXResponse, error)
HDel(ctx context.Context, in *HDelRequest, opts ...grpc.CallOption) (*HDelResponse, error)
HExists(ctx context.Context, in *HExistsRequest, opts ...grpc.CallOption) (*HExistsResponse, error)
HGet(ctx context.Context, in *HGetRequest, opts ...grpc.CallOption) (*HGetResponse, error)
HGetAll(ctx context.Context, in *HGetAllRequest, opts ...grpc.CallOption) (*HGetAllResponse, error)
HIncrBy(ctx context.Context, in *HIncrByRequest, opts ...grpc.CallOption) (*HIncrByResponse, error)
HKeys(ctx context.Context, in *HKeysRequest, opts ...grpc.CallOption) (*HKeysResponse, error)
HLen(ctx context.Context, in *HLenRequest, opts ...grpc.CallOption) (*HLenResponse, error)
HSet(ctx context.Context, in *HSetRequest, opts ...grpc.CallOption) (*HSetResponse, error)
HSetX(ctx context.Context, in *HSetXRequest, opts ...grpc.CallOption) (*HSetXResponse, error)
}
type commServerClient struct {
@ -458,6 +527,87 @@ func (c *commServerClient) RPushX(ctx context.Context, in *RPushXRequest, opts .
return out, nil
}
func (c *commServerClient) HDel(ctx context.Context, in *HDelRequest, opts ...grpc.CallOption) (*HDelResponse, error) {
out := new(HDelResponse)
err := c.cc.Invoke(ctx, "/CommServer/HDel", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *commServerClient) HExists(ctx context.Context, in *HExistsRequest, opts ...grpc.CallOption) (*HExistsResponse, error) {
out := new(HExistsResponse)
err := c.cc.Invoke(ctx, "/CommServer/HExists", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *commServerClient) HGet(ctx context.Context, in *HGetRequest, opts ...grpc.CallOption) (*HGetResponse, error) {
out := new(HGetResponse)
err := c.cc.Invoke(ctx, "/CommServer/HGet", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *commServerClient) HGetAll(ctx context.Context, in *HGetAllRequest, opts ...grpc.CallOption) (*HGetAllResponse, error) {
out := new(HGetAllResponse)
err := c.cc.Invoke(ctx, "/CommServer/HGetAll", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *commServerClient) HIncrBy(ctx context.Context, in *HIncrByRequest, opts ...grpc.CallOption) (*HIncrByResponse, error) {
out := new(HIncrByResponse)
err := c.cc.Invoke(ctx, "/CommServer/HIncrBy", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *commServerClient) HKeys(ctx context.Context, in *HKeysRequest, opts ...grpc.CallOption) (*HKeysResponse, error) {
out := new(HKeysResponse)
err := c.cc.Invoke(ctx, "/CommServer/HKeys", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *commServerClient) HLen(ctx context.Context, in *HLenRequest, opts ...grpc.CallOption) (*HLenResponse, error) {
out := new(HLenResponse)
err := c.cc.Invoke(ctx, "/CommServer/HLen", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *commServerClient) HSet(ctx context.Context, in *HSetRequest, opts ...grpc.CallOption) (*HSetResponse, error) {
out := new(HSetResponse)
err := c.cc.Invoke(ctx, "/CommServer/HSet", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *commServerClient) HSetX(ctx context.Context, in *HSetXRequest, opts ...grpc.CallOption) (*HSetXResponse, error) {
out := new(HSetXResponse)
err := c.cc.Invoke(ctx, "/CommServer/HSetX", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// CommServerServer is the server API for CommServer service.
type CommServerServer interface {
Set(context.Context, *SetRequest) (*SetResponse, error)
@ -482,6 +632,15 @@ type CommServerServer interface {
LTrim(context.Context, *LTrimRequest) (*LTrimResponse, error)
RPush(context.Context, *RPushRequest) (*RPushResponse, error)
RPushX(context.Context, *RPushXRequest) (*RPushXResponse, error)
HDel(context.Context, *HDelRequest) (*HDelResponse, error)
HExists(context.Context, *HExistsRequest) (*HExistsResponse, error)
HGet(context.Context, *HGetRequest) (*HGetResponse, error)
HGetAll(context.Context, *HGetAllRequest) (*HGetAllResponse, error)
HIncrBy(context.Context, *HIncrByRequest) (*HIncrByResponse, error)
HKeys(context.Context, *HKeysRequest) (*HKeysResponse, error)
HLen(context.Context, *HLenRequest) (*HLenResponse, error)
HSet(context.Context, *HSetRequest) (*HSetResponse, error)
HSetX(context.Context, *HSetXRequest) (*HSetXResponse, error)
}
// UnimplementedCommServerServer can be embedded to have forward compatible implementations.
@ -554,6 +713,33 @@ func (*UnimplementedCommServerServer) RPush(context.Context, *RPushRequest) (*RP
func (*UnimplementedCommServerServer) RPushX(context.Context, *RPushXRequest) (*RPushXResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RPushX not implemented")
}
func (*UnimplementedCommServerServer) HDel(context.Context, *HDelRequest) (*HDelResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HDel not implemented")
}
func (*UnimplementedCommServerServer) HExists(context.Context, *HExistsRequest) (*HExistsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HExists not implemented")
}
func (*UnimplementedCommServerServer) HGet(context.Context, *HGetRequest) (*HGetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HGet not implemented")
}
func (*UnimplementedCommServerServer) HGetAll(context.Context, *HGetAllRequest) (*HGetAllResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HGetAll not implemented")
}
func (*UnimplementedCommServerServer) HIncrBy(context.Context, *HIncrByRequest) (*HIncrByResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HIncrBy not implemented")
}
func (*UnimplementedCommServerServer) HKeys(context.Context, *HKeysRequest) (*HKeysResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HKeys not implemented")
}
func (*UnimplementedCommServerServer) HLen(context.Context, *HLenRequest) (*HLenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HLen not implemented")
}
func (*UnimplementedCommServerServer) HSet(context.Context, *HSetRequest) (*HSetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HSet not implemented")
}
func (*UnimplementedCommServerServer) HSetX(context.Context, *HSetXRequest) (*HSetXResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method HSetX not implemented")
}
func RegisterCommServerServer(s *grpc.Server, srv CommServerServer) {
s.RegisterService(&_CommServer_serviceDesc, srv)
@ -955,6 +1141,168 @@ func _CommServer_RPushX_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler)
}
func _CommServer_HDel_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HDelRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).HDel(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/HDel",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).HDel(ctx, req.(*HDelRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_HExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HExistsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).HExists(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/HExists",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).HExists(ctx, req.(*HExistsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_HGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HGetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).HGet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/HGet",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).HGet(ctx, req.(*HGetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_HGetAll_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HGetAllRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).HGetAll(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/HGetAll",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).HGetAll(ctx, req.(*HGetAllRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_HIncrBy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HIncrByRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).HIncrBy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/HIncrBy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).HIncrBy(ctx, req.(*HIncrByRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_HKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HKeysRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).HKeys(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/HKeys",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).HKeys(ctx, req.(*HKeysRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_HLen_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HLenRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).HLen(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/HLen",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).HLen(ctx, req.(*HLenRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_HSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HSetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).HSet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/HSet",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).HSet(ctx, req.(*HSetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CommServer_HSetX_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HSetXRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CommServerServer).HSetX(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/CommServer/HSetX",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CommServerServer).HSetX(ctx, req.(*HSetXRequest))
}
return interceptor(ctx, in, info, handler)
}
var _CommServer_serviceDesc = grpc.ServiceDesc{
ServiceName: "CommServer",
HandlerType: (*CommServerServer)(nil),
@ -1047,6 +1395,42 @@ var _CommServer_serviceDesc = grpc.ServiceDesc{
MethodName: "RPushX",
Handler: _CommServer_RPushX_Handler,
},
{
MethodName: "HDel",
Handler: _CommServer_HDel_Handler,
},
{
MethodName: "HExists",
Handler: _CommServer_HExists_Handler,
},
{
MethodName: "HGet",
Handler: _CommServer_HGet_Handler,
},
{
MethodName: "HGetAll",
Handler: _CommServer_HGetAll_Handler,
},
{
MethodName: "HIncrBy",
Handler: _CommServer_HIncrBy_Handler,
},
{
MethodName: "HKeys",
Handler: _CommServer_HKeys_Handler,
},
{
MethodName: "HLen",
Handler: _CommServer_HLen_Handler,
},
{
MethodName: "HSet",
Handler: _CommServer_HSet_Handler,
},
{
MethodName: "HSetX",
Handler: _CommServer_HSetX_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "storage.proto",

78
protobuf/hashx.proto Normal file
View File

@ -0,0 +1,78 @@
syntax = "proto3";
import "base.proto";
option go_package = "pkg/proto";
message HDelRequest {
BaseKey key = 1;
repeated string h_keys = 2;
}
message HDelResponse {
}
message HExistsRequest {
BaseKey key = 1;
string h_key = 2;
}
message HExistsResponse {
}
message HGetRequest {
BaseKey key = 1;
repeated string h_keys = 2;
}
message HGetResponse {
map<string, string> items = 1;
}
message HGetAllRequest {
BaseKey key = 1;
}
message HGetAllResponse {
map<string, string> items = 1;
}
message HIncrByRequest {
BaseKey key = 1;
repeated string h_keys = 2;
}
message HIncrByResponse {
map<string, string> items = 1;
}
message HKeysRequest {
BaseKey key = 1;
}
message HKeysResponse {
repeated string keys = 1;
}
message HLenRequest {
BaseKey key = 1;
}
message HLenResponse {
int32 length = 1;
}
message HSetRequest {
BaseKey key = 1;
map<string, string> items = 2;
}
message HSetResponse {
}
message HSetXRequest {
BaseKey key = 1;
map<string, string> items = 2;
}
message HSetXResponse {
int32 count = 1;
}

View File

@ -7,6 +7,7 @@ option go_package = "pkg/proto";
import "stringx.proto";
import "listx.proto";
import "hashx.proto";
service CommServer {
@ -32,4 +33,13 @@ service CommServer {
rpc LTrim (LTrimRequest) returns (LTrimResponse);
rpc RPush (RPushRequest) returns (RPushResponse);
rpc RPushX (RPushXRequest) returns (RPushXResponse);
rpc HDel (HDelRequest) returns (HDelResponse);
rpc HExists (HExistsRequest) returns (HExistsResponse);
rpc HGet (HGetRequest) returns (HGetResponse);
rpc HGetAll (HGetAllRequest) returns (HGetAllResponse);
rpc HIncrBy (HIncrByRequest) returns (HIncrByResponse);
rpc HKeys (HKeysRequest) returns (HKeysResponse);
rpc HLen (HLenRequest) returns (HLenResponse);
rpc HSet (HSetRequest) returns (HSetResponse);
rpc HSetX (HSetXRequest) returns (HSetXResponse);
}

View File

@ -17,6 +17,7 @@ def out_proto():
if err:
print(f, "-> out put err")
return os._exit(-1)
else:
print(f, "-> success")

View File

@ -8,6 +8,7 @@ const (
STRING_X
LIST_X
HASH_X
)
const (
@ -34,6 +35,15 @@ const (
LTrim
RPush
RPushX
HDel
HExists
HGet
HGetAll
HIncrBy
HKeys
HLen
HSet
HSetX
)
var CommKeyString = map[string]int{
@ -60,6 +70,16 @@ var CommKeyString = map[string]int{
"LTrim": LIST_X,
"RPush": LIST_X,
"RPushX": LIST_X,
"HDel": HASH_X,
"HExists": HASH_X,
"HGet": HASH_X,
"HGetAll": HASH_X,
"HIncrBy": HASH_X,
"HKeys": HASH_X,
"HLen": HASH_X,
"HSet": HASH_X,
"HSetX": HASH_X,
}
var CommKey = map[int]int{
@ -86,4 +106,14 @@ var CommKey = map[int]int{
LTrim: LIST_X,
RPush: LIST_X,
RPushX: LIST_X,
HDel: HASH_X,
HExists: HASH_X,
HGet: HASH_X,
HGetAll: HASH_X,
HIncrBy: HASH_X,
HKeys: HASH_X,
HLen: HASH_X,
HSet: HASH_X,
HSetX: HASH_X,
}