forked from p93542168/wheat-cache
92 lines
1.1 KiB
Protocol Buffer
92 lines
1.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
import "base.proto";
|
|
option go_package = "pkg/proto";
|
|
|
|
message SetRequest {
|
|
BaseKey key = 1;
|
|
string val = 2;
|
|
}
|
|
|
|
message SetResponse {
|
|
string result = 2;
|
|
}
|
|
|
|
message GetRequest {
|
|
BaseKey key = 1;
|
|
}
|
|
|
|
message GetResponse {
|
|
string result = 2;
|
|
}
|
|
|
|
message AddRequest {
|
|
BaseKey key = 1;
|
|
int32 renewal = 2;
|
|
}
|
|
|
|
message AddResponse {
|
|
string result = 2;
|
|
}
|
|
|
|
message ReduceRequest {
|
|
BaseKey key = 1;
|
|
int32 renewal = 2;
|
|
}
|
|
|
|
message ReduceResponse {
|
|
string result = 2;
|
|
}
|
|
|
|
message SetbitRequest {
|
|
BaseKey key = 1;
|
|
bool val = 2;
|
|
int32 offer = 3;
|
|
}
|
|
|
|
message SetbitResponse {
|
|
}
|
|
|
|
message GetbitRequest {
|
|
BaseKey key = 1;
|
|
int32 offer = 3;
|
|
}
|
|
|
|
message GetbitResponse {
|
|
bool val = 2;
|
|
}
|
|
|
|
message GetrangeRequest {
|
|
BaseKey key = 1;
|
|
int32 start = 2;
|
|
int32 end = 3;
|
|
}
|
|
|
|
message GetrangeResponse {
|
|
string result = 2;
|
|
}
|
|
|
|
message GetsetRequest {
|
|
BaseKey key = 1;
|
|
string val = 2;
|
|
}
|
|
|
|
message GetsetResponse {
|
|
string result = 2;
|
|
}
|
|
|
|
message StrlenRequest {
|
|
BaseKey key = 1;
|
|
}
|
|
|
|
message StrlenResponse {
|
|
int32 length = 1;
|
|
}
|
|
|
|
message SetnxRequest {
|
|
BaseKey key = 1;
|
|
string val = 2;
|
|
}
|
|
|
|
message SetnxResponse {
|
|
}
|