mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-19 14:05:23 +00:00
make the file service multi-tenant and add read endpoint
This commit is contained in:
@@ -5,6 +5,7 @@ package file;
|
||||
option go_package = "./proto;file";
|
||||
|
||||
service File {
|
||||
rpc Read(ReadRequest) returns (ReadResponse) {}
|
||||
rpc Save(SaveRequest) returns (SaveResponse) {}
|
||||
rpc List(ListRequest) returns (ListResponse) {}
|
||||
}
|
||||
@@ -27,6 +28,19 @@ message Record {
|
||||
string owner = 9;
|
||||
}
|
||||
|
||||
// Read a file by path
|
||||
message ReadRequest {
|
||||
// project name
|
||||
string project = 1;
|
||||
// path to the file
|
||||
string path = 2;
|
||||
}
|
||||
|
||||
message ReadResponse {
|
||||
// Returns the file
|
||||
Record file = 1;
|
||||
}
|
||||
|
||||
// The save endpoint lets you batch save text file.
|
||||
message SaveRequest {
|
||||
repeated Record files = 1;
|
||||
|
||||
Reference in New Issue
Block a user