mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 15:34:53 +01:00
alemidev
83ae6e3cd1
Added a "session" stage, to auth and connect to a Workspace. Added workspace-level operations (sync, get buffers list...). Added buffer-level sync operations (push, pull).
36 lines
602 B
Protocol Buffer
36 lines
602 B
Protocol Buffer
syntax = "proto3";
|
|
package buffer;
|
|
|
|
service Buffer {
|
|
rpc Attach (stream Operation) returns (stream Operation);
|
|
rpc Push (BufferPayload) returns (BufferResponse);
|
|
rpc Pull (BufferPayload) returns (BufferPayload);
|
|
}
|
|
|
|
message Operation {
|
|
int64 opId = 1;
|
|
|
|
enum Action {
|
|
RETAIN = 0;
|
|
INSERT = 1;
|
|
DELETE = 2;
|
|
};
|
|
Action action = 2;
|
|
|
|
int32 row = 3;
|
|
int32 column = 4;
|
|
|
|
optional string text = 5;
|
|
}
|
|
|
|
message BufferPayload {
|
|
string sessionKey = 1;
|
|
string path = 2;
|
|
optional string content = 3;
|
|
}
|
|
|
|
message BufferResponse {
|
|
string sessionKey = 1;
|
|
string path = 2;
|
|
bool accepted = 3;
|
|
}
|