Add opts to service proto (#1517)

* Add opts to service proto

* Support database/table opts
This commit is contained in:
Asim Aslam
2020-04-30 22:51:25 +01:00
committed by GitHub
parent fccab8ad27
commit 359b8bc503
8 changed files with 774 additions and 830 deletions

View File

@@ -21,10 +21,12 @@ message Record {
}
message ReadOptions {
bool prefix = 1;
bool suffix = 2;
uint64 limit = 3;
uint64 offset = 4;
string database = 1;
string table = 2;
bool prefix = 3;
bool suffix = 4;
uint64 limit = 5;
uint64 offset = 6;
}
message ReadRequest {
@@ -37,10 +39,12 @@ message ReadResponse {
}
message WriteOptions {
string database = 1;
string table = 2;
// time.Time
int64 expiry = 1;
int64 expiry = 3;
// time.Duration
int64 ttl = 2;
int64 ttl = 4;
}
message WriteRequest {
@@ -50,7 +54,10 @@ message WriteRequest {
message WriteResponse {}
message DeleteOptions {}
message DeleteOptions {
string database = 1;
string table = 2;
}
message DeleteRequest {
string key = 1;
@@ -60,12 +67,15 @@ message DeleteRequest {
message DeleteResponse {}
message ListOptions {
string prefix = 1;
string suffix = 2;
uint64 limit = 3;
uint64 offset = 4;
string database = 1;
string table = 2;
string prefix = 3;
string suffix = 4;
uint64 limit = 5;
uint64 offset = 6;
}
message ListRequest {
ListOptions options = 1;
}