2022-07-13 01:56:21 +02:00
|
|
|
syntax = "proto3";
|
|
|
|
package buffer;
|
|
|
|
|
|
|
|
service Buffer {
|
2023-04-07 03:05:21 +02:00
|
|
|
rpc Attach (BufferPayload) returns (stream RawOp);
|
|
|
|
rpc Edit (OperationRequest) returns (BufferResponse);
|
|
|
|
rpc Create (BufferPayload) returns (BufferResponse);
|
2023-04-11 22:35:10 +02:00
|
|
|
rpc Sync (BufferPayload) returns (BufferResponse);
|
2022-07-13 01:56:21 +02:00
|
|
|
}
|
|
|
|
|
2023-04-07 03:05:21 +02:00
|
|
|
message RawOp {
|
|
|
|
string opseq = 1;
|
2023-04-10 20:24:11 +02:00
|
|
|
string user = 2;
|
2023-04-07 03:05:21 +02:00
|
|
|
}
|
2022-07-13 01:56:21 +02:00
|
|
|
|
2023-04-07 03:05:21 +02:00
|
|
|
message OperationRequest {
|
|
|
|
string path = 1;
|
|
|
|
string hash = 2;
|
|
|
|
string opseq = 3;
|
2023-04-10 20:24:11 +02:00
|
|
|
string user = 4;
|
2022-07-13 01:56:21 +02:00
|
|
|
}
|
2022-07-31 13:44:48 +02:00
|
|
|
|
|
|
|
message BufferPayload {
|
2023-04-10 20:24:11 +02:00
|
|
|
string path = 1;
|
|
|
|
string user = 2;
|
2022-07-31 13:44:48 +02:00
|
|
|
optional string content = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BufferResponse {
|
2023-04-10 20:24:11 +02:00
|
|
|
bool accepted = 1;
|
2023-04-11 22:35:10 +02:00
|
|
|
optional string content = 2;
|
2022-07-31 13:44:48 +02:00
|
|
|
}
|