mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 23:44:55 +01:00
46 lines
879 B
Protocol Buffer
46 lines
879 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);
|
|
rpc Sync (BufferPayload) returns (BufferResponse);
|
|
rpc Moved (Cursor) returns (BufferResponse);
|
|
rpc Listen (BufferPayload) returns (stream Cursor);
|
|
}
|
|
|
|
message Position {
|
|
int32 row = 1;
|
|
int32 col = 2;
|
|
}
|
|
|
|
message Cursor {
|
|
string user = 1;
|
|
string buffer = 2;
|
|
Position start = 3;
|
|
Position end = 4;
|
|
}
|
|
|
|
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;
|
|
optional string content = 2;
|
|
}
|