-
Notifications
You must be signed in to change notification settings - Fork 24
/
storage.proto
99 lines (78 loc) · 1.42 KB
/
storage.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
syntax = "proto3";
package PB_Storage;
option java_package = "com.flipperdevices.protobuf.storage";
message File {
enum FileType {
FILE = 0; // default value
DIR = 1;
}
FileType type = 1;
string name = 2;
uint32 size = 3;
bytes data = 4;
string md5sum = 5;
}
message InfoRequest {
string path = 1;
}
message InfoResponse {
uint64 total_space = 1;
uint64 free_space = 2;
}
message TimestampRequest {
string path = 1;
}
message TimestampResponse {
uint32 timestamp = 1;
}
message StatRequest {
string path = 1;
}
message StatResponse {
File file = 1;
}
message ListRequest {
string path = 1;
bool include_md5 = 2;
uint32 filter_max_size = 3;
}
message ListResponse {
repeated File file = 1;
}
message ReadRequest {
string path = 1;
}
message ReadResponse {
File file = 1;
}
message WriteRequest {
string path = 1;
File file = 2;
}
message DeleteRequest {
string path = 1;
bool recursive = 2;
}
message MkdirRequest {
string path = 1;
}
message Md5sumRequest {
string path = 1;
}
message Md5sumResponse {
string md5sum = 1;
}
message RenameRequest {
string old_path = 1;
string new_path = 2;
}
message BackupCreateRequest {
string archive_path = 1;
}
message BackupRestoreRequest {
string archive_path = 1;
}
message TarExtractRequest {
string tar_path = 1;
string out_path = 2;
}