mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-26 00:44:48 +01:00
feat: adding an initial proto version for the workspace event stream
This commit is contained in:
parent
4ae31df3ff
commit
d14f004f73
2 changed files with 17 additions and 3 deletions
|
@ -19,6 +19,20 @@ message WorkspaceMessage {
|
||||||
required string id = 1; //unused???
|
required string id = 1; //unused???
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum WorkspaceEventType {
|
||||||
|
USER_JOIN = 0;
|
||||||
|
USER_LEAVE = 1;
|
||||||
|
FILE_CREATE = 2;
|
||||||
|
FILE_DELETE = 3;
|
||||||
|
FILE_RENAME = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message WorkspaceEvent {
|
||||||
|
required string id = 1; // the id of the user, or the path of the file
|
||||||
|
required WorkspaceEventType event = 2;
|
||||||
|
optional string extra = 3; // new name? extra info on user events etc...
|
||||||
|
}
|
||||||
|
|
||||||
message JoinRequest {
|
message JoinRequest {
|
||||||
required string username = 1;
|
required string username = 1;
|
||||||
required string password = 2;
|
required string password = 2;
|
||||||
|
|
|
@ -13,6 +13,6 @@ service Workspace {
|
||||||
rpc ListBuffers (workspace.BufferListRequest) returns (files.BufferTree);
|
rpc ListBuffers (workspace.BufferListRequest) returns (files.BufferTree);
|
||||||
rpc ListUsers (workspace.UserListRequest) returns (workspace.UserList);
|
rpc ListUsers (workspace.UserListRequest) returns (workspace.UserList);
|
||||||
rpc ListBufferUsers (workspace.BufferPayload) returns (workspace.UserList); //TODO discuss
|
rpc ListBufferUsers (workspace.BufferPayload) returns (workspace.UserList); //TODO discuss
|
||||||
rpc Join (workspace.JoinRequest) returns (workspace.Token);
|
rpc Join (workspace.JoinRequest) returns (stream workspace.WorkspaceEvent);
|
||||||
rpc Delete (workspace.BufferPayload) returns (workspace.Empty); //deletes buffer
|
rpc Delete (workspace.BufferPayload) returns (workspace.Empty); //deletes buffer
|
||||||
}
|
}
|
Loading…
Reference in a new issue