2018-05-08 08:59:43 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2018-05-10 06:18:02 +00:00
|
|
|
package filer_pb;
|
2018-05-08 08:59:43 +00:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
service SeaweedFiler {
|
|
|
|
|
|
|
|
rpc LookupDirectoryEntry (LookupDirectoryEntryRequest) returns (LookupDirectoryEntryResponse) {
|
|
|
|
}
|
|
|
|
|
|
|
|
rpc ListEntries (ListEntriesRequest) returns (ListEntriesResponse) {
|
|
|
|
}
|
|
|
|
|
2018-05-21 08:25:30 +00:00
|
|
|
rpc GetEntryAttributes (GetEntryAttributesRequest) returns (GetEntryAttributesResponse) {
|
2018-05-08 08:59:43 +00:00
|
|
|
}
|
|
|
|
|
2018-05-16 07:08:44 +00:00
|
|
|
rpc CreateEntry (CreateEntryRequest) returns (CreateEntryResponse) {
|
|
|
|
}
|
|
|
|
|
2018-05-22 10:26:38 +00:00
|
|
|
rpc UpdateEntry (UpdateEntryRequest) returns (UpdateEntryResponse) {
|
2018-05-16 07:08:44 +00:00
|
|
|
}
|
|
|
|
|
2018-05-08 08:59:43 +00:00
|
|
|
rpc DeleteEntry (DeleteEntryRequest) returns (DeleteEntryResponse) {
|
|
|
|
}
|
|
|
|
|
2018-05-16 07:08:44 +00:00
|
|
|
rpc AssignVolume (AssignVolumeRequest) returns (AssignVolumeResponse) {
|
|
|
|
}
|
|
|
|
|
2018-05-24 08:22:37 +00:00
|
|
|
rpc LookupVolume (LookupVolumeRequest) returns (LookupVolumeResponse) {
|
|
|
|
}
|
|
|
|
|
2018-07-20 07:10:01 +00:00
|
|
|
rpc DeleteCollection (DeleteCollectionRequest) returns (DeleteCollectionResponse) {
|
|
|
|
}
|
|
|
|
|
2018-05-08 08:59:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////
|
|
|
|
|
|
|
|
message LookupDirectoryEntryRequest {
|
|
|
|
string directory = 1;
|
|
|
|
string name = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message LookupDirectoryEntryResponse {
|
|
|
|
Entry entry = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ListEntriesRequest {
|
|
|
|
string directory = 1;
|
2018-07-22 08:14:36 +00:00
|
|
|
string prefix = 2;
|
|
|
|
string startFromFileName = 3;
|
|
|
|
bool inclusiveStartFrom = 4;
|
|
|
|
uint32 limit = 5;
|
2018-05-08 08:59:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ListEntriesResponse {
|
|
|
|
repeated Entry entries = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Entry {
|
|
|
|
string name = 1;
|
|
|
|
bool is_directory = 2;
|
2018-05-16 07:08:44 +00:00
|
|
|
repeated FileChunk chunks = 3;
|
2018-05-08 08:59:43 +00:00
|
|
|
FuseAttributes attributes = 4;
|
|
|
|
}
|
|
|
|
|
2018-05-16 07:08:44 +00:00
|
|
|
message FileChunk {
|
|
|
|
string file_id = 1;
|
|
|
|
int64 offset = 2;
|
|
|
|
uint64 size = 3;
|
2018-05-16 07:54:44 +00:00
|
|
|
int64 mtime = 4;
|
2018-05-16 07:08:44 +00:00
|
|
|
}
|
|
|
|
|
2018-05-08 08:59:43 +00:00
|
|
|
message FuseAttributes {
|
|
|
|
uint64 file_size = 1;
|
|
|
|
int64 mtime = 2;
|
|
|
|
uint32 file_mode = 3;
|
|
|
|
uint32 uid = 4;
|
|
|
|
uint32 gid = 5;
|
2018-05-26 06:26:40 +00:00
|
|
|
int64 crtime = 6;
|
2018-05-31 03:24:57 +00:00
|
|
|
string mime = 7;
|
2018-06-10 23:57:32 +00:00
|
|
|
string replication = 8;
|
|
|
|
string collection = 9;
|
|
|
|
int32 ttl_sec = 10;
|
2018-05-08 08:59:43 +00:00
|
|
|
}
|
|
|
|
|
2018-05-21 08:25:30 +00:00
|
|
|
message GetEntryAttributesRequest {
|
2018-05-08 08:59:43 +00:00
|
|
|
string name = 1;
|
|
|
|
string parent_dir = 2;
|
|
|
|
string file_id = 3;
|
|
|
|
}
|
|
|
|
|
2018-05-21 08:25:30 +00:00
|
|
|
message GetEntryAttributesResponse {
|
2018-05-08 08:59:43 +00:00
|
|
|
FuseAttributes attributes = 1;
|
2018-05-22 11:31:44 +00:00
|
|
|
repeated FileChunk chunks = 2;
|
2018-05-08 08:59:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetFileContentRequest {
|
|
|
|
string file_id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetFileContentResponse {
|
|
|
|
bytes content = 1;
|
|
|
|
}
|
|
|
|
|
2018-05-16 07:08:44 +00:00
|
|
|
message CreateEntryRequest {
|
|
|
|
string directory = 1;
|
|
|
|
Entry entry = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CreateEntryResponse {
|
|
|
|
}
|
|
|
|
|
2018-05-24 08:22:37 +00:00
|
|
|
message UpdateEntryRequest {
|
|
|
|
string directory = 1;
|
|
|
|
Entry entry = 2;
|
|
|
|
}
|
|
|
|
message UpdateEntryResponse {
|
|
|
|
}
|
|
|
|
|
2018-05-08 08:59:43 +00:00
|
|
|
message DeleteEntryRequest {
|
|
|
|
string directory = 1;
|
|
|
|
string name = 2;
|
|
|
|
bool is_directory = 3;
|
2018-06-07 05:11:01 +00:00
|
|
|
bool is_delete_data = 4;
|
2018-07-19 08:21:44 +00:00
|
|
|
bool is_recursive = 5;
|
2018-05-08 08:59:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteEntryResponse {
|
|
|
|
}
|
2018-05-16 07:08:44 +00:00
|
|
|
|
|
|
|
message AssignVolumeRequest {
|
|
|
|
int32 count = 1;
|
|
|
|
string collection = 2;
|
|
|
|
string replication = 3;
|
2018-06-12 06:13:33 +00:00
|
|
|
int32 ttl_sec = 4;
|
2018-07-14 20:36:28 +00:00
|
|
|
string data_center = 5;
|
2018-05-16 07:08:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message AssignVolumeResponse {
|
|
|
|
string file_id = 1;
|
|
|
|
string url = 2;
|
|
|
|
string public_url = 3;
|
|
|
|
int32 count = 4;
|
|
|
|
}
|
|
|
|
|
2018-05-24 08:22:37 +00:00
|
|
|
message LookupVolumeRequest {
|
|
|
|
repeated string volume_ids = 1;
|
2018-05-16 07:08:44 +00:00
|
|
|
}
|
2018-05-24 08:22:37 +00:00
|
|
|
|
|
|
|
message Locations {
|
|
|
|
repeated Location locations = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Location {
|
|
|
|
string url = 1;
|
|
|
|
string public_url = 2;
|
|
|
|
}
|
|
|
|
message LookupVolumeResponse {
|
|
|
|
map<string, Locations> locations_map = 1;
|
2018-05-16 07:08:44 +00:00
|
|
|
}
|
2018-07-20 07:10:01 +00:00
|
|
|
|
|
|
|
message DeleteCollectionRequest {
|
|
|
|
string collection = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteCollectionResponse {
|
|
|
|
}
|