codemp/proto/cursor.proto

31 lines
457 B
Protocol Buffer
Raw Normal View History

2023-08-16 17:08:31 +02:00
syntax = "proto3";
package codemp.cursor;
service Cursor {
rpc Moved (CursorEvent) returns (MovedResponse);
rpc Listen (UserIdentity) returns (stream CursorEvent);
2023-08-16 17:08:31 +02:00
}
message MovedResponse {}
message RowCol {
2023-08-16 17:08:31 +02:00
int32 row = 1;
int32 col = 2;
}
message CursorPosition {
string buffer = 1;
RowCol start = 2;
RowCol end = 3;
}
message CursorEvent {
2023-08-16 17:08:31 +02:00
string user = 1;
CursorPosition position = 2;
2023-08-16 17:08:31 +02:00
}
message UserIdentity {
string id = 1;
}