-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspec.proto
48 lines (35 loc) · 884 Bytes
/
spec.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
syntax = "proto3";
option go_package = "github.com/lokidb/server/pkg/communication/grpc";
package lokidb;
import "google/protobuf/empty.proto";
message GetRequest {
string key = 1;
}
message GetResponse {
string value = 1;
}
message SetRequest {
string key = 1;
string value = 2;
}
message DelRequest {
string key = 1;
}
message DelResponse {
bool deleted = 1;
}
message KeysResponse {
repeated string keys = 1;
}
service LokiDBService {
// Delete key
rpc Del(DelRequest) returns (DelResponse) {}
// Flush all keys
rpc Flush(google.protobuf.Empty) returns (google.protobuf.Empty) {}
// Get value by key
rpc Get(GetRequest) returns (GetResponse) {}
// Get list of all keys
rpc Keys(google.protobuf.Empty) returns (KeysResponse) {}
// Set key-value
rpc Set(SetRequest) returns (google.protobuf.Empty) {}
}