2020-01-16 19:10:15 +03:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2020-01-17 18:27:41 +03:00
|
|
|
service Service {
|
2020-01-18 18:16:23 +03:00
|
|
|
rpc Create (CreateRequest) returns (CreateResponse) {}
|
|
|
|
rpc Update (UpdateRequest) returns (UpdateResponse) {}
|
|
|
|
rpc Delete (DeleteRequest) returns (DeleteResponse) {}
|
|
|
|
rpc List (ListRequest) returns (ListResponse) {}
|
|
|
|
rpc Read (ReadRequest) returns (ReadResponse) {}
|
|
|
|
rpc Watch (WatchRequest) returns (stream WatchResponse) {}
|
2020-01-16 19:10:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message ChangeSet {
|
|
|
|
bytes data = 1;
|
|
|
|
string checksum = 2;
|
|
|
|
string format = 3;
|
|
|
|
string source = 4;
|
|
|
|
int64 timestamp = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Change {
|
|
|
|
string key = 1;
|
|
|
|
string path = 2;
|
|
|
|
ChangeSet changeSet = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CreateRequest {
|
|
|
|
Change change = 1;
|
|
|
|
}
|
|
|
|
|
2020-01-18 18:16:23 +03:00
|
|
|
message CreateResponse {}
|
2020-01-16 19:10:15 +03:00
|
|
|
|
|
|
|
message UpdateRequest {
|
|
|
|
Change change = 1;
|
|
|
|
}
|
|
|
|
|
2020-01-18 18:16:23 +03:00
|
|
|
message UpdateResponse {}
|
2020-01-16 19:10:15 +03:00
|
|
|
|
|
|
|
message DeleteRequest {
|
|
|
|
Change change = 1;
|
|
|
|
}
|
|
|
|
|
2020-01-18 18:16:23 +03:00
|
|
|
message DeleteResponse {}
|
2020-01-16 19:10:15 +03:00
|
|
|
|
2020-01-18 18:16:23 +03:00
|
|
|
message ListRequest {}
|
2020-01-16 19:10:15 +03:00
|
|
|
|
|
|
|
message ListResponse {
|
2020-01-18 18:16:23 +03:00
|
|
|
repeated Change values = 1;
|
2020-01-16 19:10:15 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
message ReadRequest {
|
|
|
|
string key = 1;
|
|
|
|
string path = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ReadResponse {
|
|
|
|
Change change = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message WatchRequest {
|
|
|
|
string key = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message WatchResponse {
|
|
|
|
string key = 1;
|
|
|
|
ChangeSet changeSet = 2;
|
|
|
|
}
|