-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathservices.proto
335 lines (276 loc) · 5.93 KB
/
services.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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
syntax = "proto3";
import "datastructs.proto";
package mapit.msgs;
// COMP_ID: 20 for Requests, 21 for Replies.
// MSG_TYPE: same for req/rep-pairs. >100 indicates writing access to the server.
/**
message Region {
int64 layerId = 1;
float minx = 2;
float maxx = 3;
float miny = 4;
float maxy = 5;
float minz = 6;
float maxz = 7;
int32 levelOfDetail = 8;
bool announce = 9;
ClipMode clipMode = 10;
enum ClipMode {
EXACT = 0;
SURROUNDING = 1;
}
}
**/
message RequestWorkspace {
enum CompType {
PROTO_3 = 0;
COMP_ID = 20;
MSG_TYPE = 01;
}
string workspace = 1; // Workspace name
repeated string commit = 2; // commit id to create a new workspace from (if it does not exist). Multiple for merge.
// createIfNotExists: false: only check if this workspace exists.
// true: create the workspace, if it did not exist. Returns the existing workspace otherwise
bool createIfNotExists = 3;
}
message ReplyWorkspace {
enum CompType {
PROTO_3 = 0;
COMP_ID = 21;
MSG_TYPE = 01;
}
enum Status {
SUCCESS = 0;
EXISTED = 1;
ERROR = 2;
}
Status status = 1;
repeated string commit = 2; // commit ids the current workspace is based on
}
message RequestListWorkspaces {
enum CompType {
PROTO_3 = 0;
COMP_ID = 20;
MSG_TYPE = 02;
}
}
message ReplyListWorkspaces {
enum CompType {
PROTO_3 = 0;
COMP_ID = 21;
MSG_TYPE = 02;
}
repeated string workspaces = 1;
}
message RequestHierarchyPlain {
enum CompType {
PROTO_3 = 0;
COMP_ID = 20;
MSG_TYPE = 993;
}
string workspace = 1;
string entrypoint = 2;
}
message ReplyHierarchyPlain {
enum CompType {
PROTO_3 = 0;
COMP_ID = 21;
MSG_TYPE = 993;
}
enum Status {
SUCCESS = 0;
WORKSPACE_NOT_FOUND = 1;
NOT_FOUND = 404;
}
Status status = 1;
repeated string entities = 2;
}
message RequestHierarchy {
enum CompType {
PROTO_3 = 0;
COMP_ID = 20;
MSG_TYPE = 03;
}
string workspace = 1;
// string hierarchy = 2;
}
message ReplyHierarchyLayer {
// name, type
map<string, LayerType> entities = 1;
}
message ReplyHierarchyMap {
map<string, ReplyHierarchyLayer> layers = 1;
}
message ReplyHierarchy {
enum CompType {
PROTO_3 = 0;
COMP_ID = 21;
MSG_TYPE = 03;
}
map<string, ReplyHierarchyMap> maps = 1;
}
message RequestEntitydata {
enum CompType {
PROTO_3 = 0;
COMP_ID = 20;
MSG_TYPE = 04;
}
string workspace = 1;
string entitypath = 2;
// transmit large datasets piecewise
uint64 offset = 3;
// must fit into the servers and clients ram (e.g. 2gb maximum). Maybe even twice (*needs validation)
// zero is treated as zero. server returns an header without raw data if maxlength is zero.
uint64 maxlength = 4;
}
message ReplyEntitydata {
enum CompType {
PROTO_3 = 0;
COMP_ID = 21;
MSG_TYPE = 04;
}
enum Status {
SUCCESS = 0;
EXCEEDED_BOUNDARY = 1;
NOT_FOUND = 404;
}
Status status = 1;
uint64 receivedlength = 2;
uint64 entitylength = 3;
}
message RequestOperatorExecution {
enum CompType {
PROTO_3 = 0;
COMP_ID = 20;
MSG_TYPE = 101;
}
string workspace = 1;
OperationDescription param = 2;
}
message ReplyOperatorExecution {
enum CompType {
PROTO_3 = 0;
COMP_ID = 21;
MSG_TYPE = 101;
}
int32 status_code = 1; // operator specific error code (0 is ok)
string error_msg = 2; // human readable error code (optional)
//ReplyHierarchy changed_entities = 3;
OperationDescription result = 4;
}
// Note: This message is used as header for a binary raw message.
// If something with the header is wrong, all the sent data may be discarded.
// If the message does not fit into the servers RAM at once, the message is discarded.
// To handle this raw data can be split into multiple smaller pieces by using offset/sendlength/entitylength
message RequestStoreEntity {
enum CompType {
PROTO_3 = 0;
COMP_ID = 20;
MSG_TYPE = 102;
}
string workspace = 1;
string path = 2;
string type = 3;
// transmit large datasets piecewise
uint64 offset = 4;
uint64 sendlength = 5; // must fit into the servers and clients ram (e.g. 2gb maximum). Maybe even twice (*needs validation)
uint64 entitylength = 6; // must be at least sendlength.
}
message ReplyStoreEntity {
enum CompType {
PROTO_3 = 0;
COMP_ID = 21;
MSG_TYPE = 102;
}
enum Status {
SUCCESS = 0;
ERROR = 1;
}
Status status = 1;
}
message RequestDeleteEntity {
enum CompType {
PROTO_3 = 0;
COMP_ID = 20;
MSG_TYPE = 103;
}
string workspace = 1;
string path = 2;
}
message ReplyDeleteEntity {
enum CompType {
PROTO_3 = 0;
COMP_ID = 21;
MSG_TYPE = 103;
}
enum Status {
SUCCESS = 0;
ERROR = 1;
}
Status status = 1;
}
message RequestDeleteTree {
enum CompType {
PROTO_3 = 0;
COMP_ID = 20;
MSG_TYPE = 105;
}
string workspace = 1;
string path = 2;
}
message ReplyDeleteTree {
enum CompType {
PROTO_3 = 0;
COMP_ID = 21;
MSG_TYPE = 105;
}
enum Status {
SUCCESS = 0;
ERROR = 1;
}
Status status = 1;
}
message RequestDoCommit {
enum CompType {
PROTO_3 = 0;
COMP_ID = 20;
MSG_TYPE = 106;
}
string workspace = 1;
string message = 2;
string author = 3;
string email = 4;
Time stamp = 5;
}
message ReplyDoCommit {
enum CompType {
PROTO_3 = 0;
COMP_ID = 21;
MSG_TYPE = 106;
}
int32 status_code = 1; // 0 is ok
string error_msg = 2; // human readable error code (optional)
string commit_id = 3;
}
message RequestCommit {
enum CompType {
PROTO_3 = 0;
COMP_ID = 20;
MSG_TYPE = 107;
}
string commit_id = 3;
}
message ReplyCommit {
enum CompType {
PROTO_3 = 0;
COMP_ID = 21;
MSG_TYPE = 107;
}
enum Status {
SUCCESS = 0;
ERROR = 1;
}
Status status = 1;
string error_msg = 2; // human readable error code (optional)
Commit commit = 3;
}