mirror of
https://github.com/hexedtech/codemp-vscode.git
synced 2024-11-25 00:44:48 +01:00
41 lines
821 B
Protocol Buffer
41 lines
821 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 Cursor (CursorMov) returns (BufferResponse);
|
|
rpc Listen (BufferPayload) returns (stream CursorMov);
|
|
}
|
|
|
|
message RawOp {
|
|
string opseq = 1;
|
|
string user = 2;
|
|
}
|
|
|
|
message CursorMov {
|
|
string user = 1;
|
|
string path = 2;
|
|
int64 row = 3;
|
|
int64 col = 4;
|
|
}
|
|
|
|
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;
|
|
}
|