codemp-nvim/proto/buffer.proto

35 lines
666 B
Protocol Buffer

syntax = "proto3";
package codemp.buffer;
service Buffer {
rpc Attach (BufferPayload) returns (stream RawOp);
rpc Edit (OperationRequest) returns (BufferEditResponse);
rpc Create (BufferPayload) returns (BufferCreateResponse);
rpc Sync (BufferPayload) returns (BufferResponse);
}
message BufferCreateResponse {}
message BufferEditResponse {}
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 {
string content = 2;
}