codemp/proto/buffer.proto

30 lines
527 B
Protocol Buffer

syntax = "proto3";
package buffer;
service Buffer {
rpc Attach (BufferPayload) returns (stream RawOp);
rpc Edit (OperationRequest) returns (BufferResponse);
rpc Create (BufferPayload) returns (BufferResponse);
}
message RawOp {
string opseq = 1;
string user = 2;
}
message OperationRequest {
string path = 1;
string hash = 2;
string opseq = 3;
string user = 4;
}
message BufferPayload {
string path = 1;
string user = 2;
optional string content = 3;
}
message BufferResponse {
bool accepted = 1;
}