2021-09-21 20:59:19 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
import "base.proto";
|
|
|
|
option go_package = "pkg/proto";
|
|
|
|
|
|
|
|
message SetRequest {
|
|
|
|
BaseKey key = 1;
|
2021-09-25 14:52:42 +08:00
|
|
|
string val = 2;
|
2021-09-21 20:59:19 +08:00
|
|
|
}
|
|
|
|
|
2021-09-25 23:38:19 +08:00
|
|
|
message SetResponse {
|
|
|
|
string result = 2;
|
|
|
|
}
|
|
|
|
|
2021-09-21 20:59:19 +08:00
|
|
|
message GetRequest {
|
|
|
|
BaseKey key = 1;
|
|
|
|
}
|
|
|
|
|
2021-09-25 23:38:19 +08:00
|
|
|
message GetResponse {
|
|
|
|
string result = 2;
|
|
|
|
}
|
|
|
|
|
2021-09-21 20:59:19 +08:00
|
|
|
message AddRequest {
|
|
|
|
BaseKey key = 1;
|
2021-09-25 23:38:19 +08:00
|
|
|
int32 renewal = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AddResponse {
|
|
|
|
string result = 2;
|
2021-09-21 20:59:19 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message ReduceRequest {
|
|
|
|
BaseKey key = 1;
|
2021-09-25 23:38:19 +08:00
|
|
|
int32 renewal = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ReduceResponse {
|
|
|
|
string result = 2;
|
2021-09-21 20:59:19 +08:00
|
|
|
}
|
|
|
|
|
2021-10-24 00:33:23 +08:00
|
|
|
|
|
|
|
message SetnxRequest {
|
2021-09-21 20:59:19 +08:00
|
|
|
BaseKey key = 1;
|
2021-10-24 00:33:23 +08:00
|
|
|
string val = 2;
|
2021-09-25 23:38:19 +08:00
|
|
|
}
|
|
|
|
|
2021-10-24 00:33:23 +08:00
|
|
|
message SetnxResponse {
|
2021-09-21 20:59:19 +08:00
|
|
|
}
|
|
|
|
|
2021-10-24 00:33:23 +08:00
|
|
|
message SetBitRequest {
|
2021-09-21 20:59:19 +08:00
|
|
|
BaseKey key = 1;
|
2021-10-24 00:33:23 +08:00
|
|
|
bool val = 2;
|
2021-09-25 23:38:19 +08:00
|
|
|
int32 offer = 3;
|
|
|
|
}
|
|
|
|
|
2021-10-24 00:33:23 +08:00
|
|
|
message SetBitResponse {
|
|
|
|
string result = 2;
|
2021-09-21 20:59:19 +08:00
|
|
|
}
|
2021-10-20 20:30:51 +08:00
|
|
|
|
2021-10-24 00:33:23 +08:00
|
|
|
message GetBitRequest {
|
2021-10-20 20:30:51 +08:00
|
|
|
BaseKey key = 1;
|
2021-10-24 00:33:23 +08:00
|
|
|
int32 offer = 2;
|
2021-10-20 20:30:51 +08:00
|
|
|
}
|
|
|
|
|
2021-10-24 00:33:23 +08:00
|
|
|
message GetBitResponse {
|
|
|
|
bool val = 1;
|
2021-10-20 20:30:51 +08:00
|
|
|
}
|
|
|
|
|
2021-10-24 00:33:23 +08:00
|
|
|
message GetRangeRequest {
|
2021-10-20 20:30:51 +08:00
|
|
|
BaseKey key = 1;
|
2021-10-24 00:33:23 +08:00
|
|
|
int32 start = 2;
|
|
|
|
int32 end = 3;
|
2021-10-20 20:30:51 +08:00
|
|
|
}
|
|
|
|
|
2021-10-24 00:33:23 +08:00
|
|
|
message GetRangeResponse {
|
|
|
|
string result = 1;
|
2021-10-20 20:30:51 +08:00
|
|
|
}
|
|
|
|
|
2021-10-24 00:33:23 +08:00
|
|
|
message GetSetRequest {
|
2021-10-20 20:30:51 +08:00
|
|
|
BaseKey key = 1;
|
2021-10-24 00:33:23 +08:00
|
|
|
string val = 2;
|
2021-10-20 20:30:51 +08:00
|
|
|
}
|
|
|
|
|
2021-10-24 00:33:23 +08:00
|
|
|
message GetSetResponse {
|
|
|
|
string result = 1;
|
2021-10-20 20:30:51 +08:00
|
|
|
}
|
|
|
|
|
2021-10-24 00:33:23 +08:00
|
|
|
message StrLenRequest {
|
2021-10-20 20:30:51 +08:00
|
|
|
BaseKey key = 1;
|
|
|
|
}
|
|
|
|
|
2021-10-24 00:33:23 +08:00
|
|
|
message StrLenResponse {
|
|
|
|
int32 length = 1;
|
2021-10-20 20:30:51 +08:00
|
|
|
}
|