mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 15:24:48 +01:00
30 lines
457 B
Protocol Buffer
30 lines
457 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package codemp.cursor;
|
|
|
|
service Cursor {
|
|
rpc Moved (CursorEvent) returns (MovedResponse);
|
|
rpc Listen (UserIdentity) returns (stream CursorEvent);
|
|
}
|
|
|
|
message MovedResponse {}
|
|
|
|
message RowCol {
|
|
int32 row = 1;
|
|
int32 col = 2;
|
|
}
|
|
|
|
message CursorPosition {
|
|
string buffer = 1;
|
|
RowCol start = 2;
|
|
RowCol end = 3;
|
|
}
|
|
|
|
message CursorEvent {
|
|
string user = 1;
|
|
CursorPosition position = 2;
|
|
}
|
|
|
|
message UserIdentity {
|
|
string id = 1;
|
|
}
|