-
Notifications
You must be signed in to change notification settings - Fork 2
/
file_service.proto
84 lines (68 loc) · 2.35 KB
/
file_service.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
syntax = "proto3";
package hiber.file;
import "base.proto";
import "file.proto";
option java_multiple_files = false;
option java_package = "global.hiber.api.grpc.file";
option java_outer_classname = "FileApi";
option go_package = ".;hiber";
service FileService {
rpc List (ListFiles.Request) returns (ListFiles.Response);
rpc Get (GetFile.Request) returns (GetFile.Response);
rpc Upload (UploadFile.Request) returns (UploadFile.Response);
rpc Delete (DeleteFile.Request) returns (DeleteFile.Response);
}
message ListFiles {
message Request {
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;
/* Select the files to list. Optional, when omitted or empty everything is included. */
optional FileSelection selection = 2;
/* Paginate through results. */
optional Pagination pagination = 3;
}
message Response {
repeated File files = 1;
Request request = 2;
Pagination.Result pagination = 3;
}
}
/* Get the content of a file that has the file_service flag set for content
* (not a url or given immediate binary data).
*/
message GetFile {
message Request {
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;
string identifier = 2;
}
message Response {
/* The requested file, with content set to data if available. */
File file = 1;
}
}
/* Upload a file to the file service. */
message UploadFile {
message Request {
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;
/* The file to upload, with either binary data or a url as content.
* If an identifier is set, it will be replaced with a generated identifier.
*/
File file = 2;
}
message Response {
File file = 1;
}
}
/* Delete a file in the file service. */
message DeleteFile {
message Request {
/* Pick the organization to use (/impersonate). If unset, your default organization is used. */
optional string organization = 1;
/* The identifier of the file to delete. */
string identifier = 2;
}
message Response {
}
}