2021-06-09 19:15:25 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
package zed.messages;
|
|
|
|
|
|
|
|
message FromClient {
|
|
|
|
int32 id = 1;
|
|
|
|
|
|
|
|
oneof variant {
|
|
|
|
Auth auth = 2;
|
2021-06-10 01:14:30 +00:00
|
|
|
NewWorktree new_worktree = 3;
|
|
|
|
ShareWorktree share_worktree = 4;
|
|
|
|
UploadFile upload_file = 5;
|
2021-06-15 08:42:06 +00:00
|
|
|
SubscribeToPathRequests subscribe_to_path_requests = 6;
|
2021-06-09 19:15:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Auth {
|
|
|
|
int32 user_id = 1;
|
|
|
|
string access_token = 2;
|
|
|
|
}
|
2021-06-10 01:14:30 +00:00
|
|
|
|
|
|
|
message NewWorktree {}
|
|
|
|
|
|
|
|
message ShareWorktree {
|
|
|
|
uint64 worktree_id = 1;
|
|
|
|
repeated PathAndDigest files = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message PathAndDigest {
|
|
|
|
bytes path = 1;
|
|
|
|
bytes digest = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message UploadFile {
|
|
|
|
bytes path = 1;
|
|
|
|
bytes content = 2;
|
|
|
|
}
|
2021-06-15 08:42:06 +00:00
|
|
|
|
|
|
|
message SubscribeToPathRequests {}
|
2021-06-09 19:15:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message FromServer {
|
|
|
|
optional int32 request_id = 1;
|
|
|
|
|
|
|
|
oneof variant {
|
2021-06-10 01:14:30 +00:00
|
|
|
AuthResponse auth_response = 2;
|
|
|
|
NewWorktreeResponse new_worktree_response = 3;
|
|
|
|
ShareWorktreeResponse share_worktree_response = 4;
|
2021-06-15 08:42:06 +00:00
|
|
|
PathRequest path_request = 5;
|
2021-06-10 01:14:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message AuthResponse {
|
|
|
|
bool credentials_valid = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message NewWorktreeResponse {
|
|
|
|
uint64 worktree_id = 1;
|
2021-06-09 19:15:25 +00:00
|
|
|
}
|
|
|
|
|
2021-06-10 01:14:30 +00:00
|
|
|
message ShareWorktreeResponse {
|
|
|
|
repeated int32 needed_file_indices = 1;
|
2021-06-09 19:15:25 +00:00
|
|
|
}
|
2021-06-15 08:42:06 +00:00
|
|
|
|
|
|
|
message PathRequest {
|
|
|
|
bytes path = 1;
|
|
|
|
}
|
|
|
|
}
|