2022-07-13 01:56:21 +02:00
|
|
|
syntax = "proto3";
|
|
|
|
package workspace;
|
|
|
|
|
|
|
|
service Workspace {
|
2022-09-24 01:14:12 +02:00
|
|
|
rpc Join (JoinRequest) returns (stream WorkspaceEvent);
|
|
|
|
rpc Subscribe (stream CursorUpdate) returns (stream CursorUpdate);
|
|
|
|
rpc ListUsers (WorkspaceRequest) returns (UsersList);
|
|
|
|
rpc Buffers (WorkspaceRequest) returns (BufferList);
|
|
|
|
rpc NewBuffer (BufferRequest) returns (WorkspaceResponse);
|
|
|
|
rpc RemoveBuffer (BufferRequest) returns (WorkspaceResponse);
|
2022-07-13 01:56:21 +02:00
|
|
|
}
|
|
|
|
|
2022-09-24 01:14:12 +02:00
|
|
|
message JoinRequest {
|
|
|
|
string name = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message WorkspaceEvent {
|
2022-07-31 13:44:48 +02:00
|
|
|
int32 id = 1;
|
|
|
|
optional string body = 2;
|
2022-07-13 01:56:21 +02:00
|
|
|
}
|
|
|
|
|
2022-09-24 01:14:12 +02:00
|
|
|
message CursorUpdate {
|
|
|
|
string username = 1;
|
|
|
|
int32 buffer = 2;
|
|
|
|
int32 col = 3;
|
|
|
|
int32 row = 4;
|
|
|
|
}
|
|
|
|
|
2022-07-31 13:44:48 +02:00
|
|
|
message WorkspaceRequest {
|
2022-07-13 01:56:21 +02:00
|
|
|
string sessionKey = 1;
|
2022-07-30 14:35:38 +02:00
|
|
|
}
|
|
|
|
|
2022-08-28 23:41:11 +02:00
|
|
|
message BufferRequest {
|
|
|
|
string sessionKey = 1;
|
|
|
|
string path = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message WorkspaceResponse {
|
|
|
|
bool accepted = 1;
|
|
|
|
}
|
|
|
|
|
2022-07-30 14:35:38 +02:00
|
|
|
message BufferList {
|
|
|
|
repeated string path = 1;
|
|
|
|
}
|
|
|
|
|
2022-08-28 23:41:11 +02:00
|
|
|
message UsersList {
|
|
|
|
repeated string name = 1;
|
|
|
|
}
|
|
|
|
|