-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
schema.proto
52 lines (43 loc) · 955 Bytes
/
schema.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
service Drive {
rpc MountDrive (DriveRequest) returns (DriveKey) {}
rpc SaveIncMailMsg (Email) returns (FileResponse) {}
rpc UnlinkMailMsg (FileRequest) returns (Empty) {}
rpc AddPeer (PeerRequest) returns (Empty) {}
rpc RemovePeer (PeerRequest) returns (Empty) {}
rpc DestroyDrive (DriveKey) returns (Empty) {}
rpc CloseDrive (DriveKey) returns (Empty) {}
}
message Email {
string email = 1;
}
message FileRequest {
string fileName = 1;
}
message FileResponse {
string key = 1;
string header = 2;
string driveKey = 3;
string fileName = 4;
uint32 fileSize = 5;
string fileHash = 6;
string path = 7;
}
message DriveRequest {
string name = 1;
string driveKey = 2;
KeyPair keyPair = 3;
bool writable = 4;
}
message PeerRequest {
string driveKey = 1;
}
message KeyPair {
string publicKey = 1;
string secretKey = 2;
}
message DriveKey {
string driveKey = 1;
string discoveryKey = 2;
}
message Empty {
}