-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
schema.proto
115 lines (97 loc) · 2.06 KB
/
schema.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
message Get {
required uint32 id = 1;
required bytes key = 2;
}
message Put {
required uint32 id = 1;
required bytes key = 2;
optional bytes value = 3;
}
message Delete {
required uint32 id = 1;
required bytes key = 2;
}
message Batch {
required uint32 id = 1;
repeated Operation ops = 2;
message Operation {
required string type = 1;
required bytes key = 2;
optional bytes value = 3;
}
}
message Clear {
required uint32 id = 1;
optional ClearOptions options = 2;
message ClearOptions {
optional bytes gt = 3;
optional bytes gte = 4;
optional bytes lt = 5;
optional bytes lte = 6;
optional sint32 limit = 7;
optional bool reverse = 8;
}
}
message Iterator {
required uint32 id = 1;
required uint32 seq = 2;
required Options options = 3;
required uint64 consumed = 4;
optional bytes bookmark = 5;
optional bytes seek = 6;
message Options {
optional bool keys = 1;
optional bool values = 2;
optional bytes gt = 3;
optional bytes gte = 4;
optional bytes lt = 5;
optional bytes lte = 6;
optional sint32 limit = 7;
optional bool reverse = 8;
}
}
message Callback {
required uint32 id = 1;
optional string error = 2;
optional bytes value = 3;
}
message IteratorData {
required uint32 id = 1;
required uint32 seq = 2;
repeated bytes data = 3;
}
message IteratorAck {
required uint32 id = 1;
required uint32 seq = 2;
required uint64 consumed = 3;
}
message IteratorSeek {
required uint32 id = 1;
required uint32 seq = 2;
required bytes target = 3;
}
message IteratorEnd {
required uint32 id = 1;
required uint32 seq = 2;
}
message IteratorError {
required uint32 id = 1;
required uint32 seq = 2;
required string error = 3;
}
message IteratorClose {
required uint32 id = 1;
}
message GetMany {
required uint32 id = 1;
repeated bytes keys = 2;
}
message GetManyCallback {
required uint32 id = 1;
optional string error = 2;
repeated Value values = 3;
// Wrapped to support undefined values
message Value {
optional bytes value = 1;
}
}