mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 05:15:00 +00:00
57 lines
No EOL
1.1 KiB
Protocol Buffer
57 lines
No EOL
1.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
package zed.messages;
|
|
|
|
message FromClient {
|
|
int32 id = 1;
|
|
|
|
oneof variant {
|
|
Auth auth = 2;
|
|
NewWorktree new_worktree = 3;
|
|
ShareWorktree share_worktree = 4;
|
|
UploadFile upload_file = 5;
|
|
}
|
|
|
|
message Auth {
|
|
int32 user_id = 1;
|
|
string access_token = 2;
|
|
}
|
|
|
|
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;
|
|
}
|
|
}
|
|
|
|
message FromServer {
|
|
optional int32 request_id = 1;
|
|
|
|
oneof variant {
|
|
AuthResponse auth_response = 2;
|
|
NewWorktreeResponse new_worktree_response = 3;
|
|
ShareWorktreeResponse share_worktree_response = 4;
|
|
}
|
|
|
|
message AuthResponse {
|
|
bool credentials_valid = 1;
|
|
}
|
|
|
|
message NewWorktreeResponse {
|
|
uint64 worktree_id = 1;
|
|
}
|
|
|
|
message ShareWorktreeResponse {
|
|
repeated int32 needed_file_indices = 1;
|
|
}
|
|
} |