mirror of
https://github.com/hexedtech/codemp.git
synced 2024-11-22 15:24:48 +01:00
moved some messages from workspace_service to files
This commit is contained in:
parent
6230371020
commit
85add1ca0d
5 changed files with 22 additions and 11 deletions
1
build.rs
1
build.rs
|
@ -7,6 +7,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
&[
|
||||
"proto/user.proto",
|
||||
"proto/cursor.proto",
|
||||
"proto/files.proto",
|
||||
"proto/buffer_service.proto",
|
||||
"proto/cursor_service.proto",
|
||||
"proto/workspace_service.proto"
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
syntax = "proto2";
|
||||
|
||||
package files;
|
||||
|
||||
|
||||
message BufferNode{
|
||||
required string path = 1;
|
||||
}
|
||||
|
||||
message BufferTree{
|
||||
repeated BufferNode buffers = 1;
|
||||
}
|
||||
|
||||
message WorkspaceFileTree {
|
||||
// list of strings may be more efficient but it's a lot more hassle
|
||||
required string payload = 1; // spappolata di json
|
||||
} //Alla fine non si usa questo per ora ma BufferTree
|
0
proto/workspace.proto
Normal file
0
proto/workspace.proto
Normal file
|
@ -26,15 +26,13 @@ syntax = "proto2";
|
|||
|
||||
package workspace_service;
|
||||
import "user.proto";
|
||||
import "files.proto";
|
||||
|
||||
|
||||
message Empty {}
|
||||
|
||||
|
||||
message WorkspaceFileTree {
|
||||
// list of strings may be more efficient but it's a lot more hassle
|
||||
required string payload = 1; // spappolata di json
|
||||
}
|
||||
|
||||
|
||||
message WorkspaceUserList {
|
||||
repeated user.UserIdentity user = 1;
|
||||
|
@ -57,7 +55,7 @@ service Workspace {
|
|||
|
||||
rpc Attach (AttachRequest) returns (Token);
|
||||
|
||||
rpc ListBuffers (BufferListRequest) returns (BufferTree);
|
||||
rpc ListBuffers (BufferListRequest) returns (files.BufferTree);
|
||||
|
||||
rpc ListUsers (UserListRequest) returns (UserList);
|
||||
|
||||
|
@ -125,13 +123,7 @@ message BufferListRequest{
|
|||
|
||||
}
|
||||
|
||||
message BufferNode{
|
||||
required string path = 1;
|
||||
}
|
||||
|
||||
message BufferTree{
|
||||
repeated BufferNode buffers = 1;
|
||||
}
|
||||
|
||||
message UserList{
|
||||
repeated user.UserIdentity users = 1;
|
||||
|
|
|
@ -167,6 +167,7 @@ pub use woot;
|
|||
pub mod proto {
|
||||
pub mod user { tonic::include_proto!("user"); }
|
||||
pub mod cursor { tonic::include_proto!("cursor"); }
|
||||
pub mod files { tonic::include_proto!("files"); }
|
||||
pub mod buffer_service { tonic::include_proto!("buffer_service"); }
|
||||
pub mod cursor_service { tonic::include_proto!("cursor_service"); }
|
||||
pub mod workspace_service { tonic::include_proto!("workspace_service"); }
|
||||
|
|
Loading…
Reference in a new issue