You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
1.6 KiB

  1. syntax = "proto3";
  2. package filer_pb;
  3. //////////////////////////////////////////////////
  4. service SeaweedFiler {
  5. rpc LookupDirectoryEntry (LookupDirectoryEntryRequest) returns (LookupDirectoryEntryResponse) {
  6. }
  7. rpc ListEntries (ListEntriesRequest) returns (ListEntriesResponse) {
  8. }
  9. rpc GetFileAttributes (GetFileAttributesRequest) returns (GetFileAttributesResponse) {
  10. }
  11. rpc GetFileContent (GetFileContentRequest) returns (GetFileContentResponse) {
  12. }
  13. rpc DeleteEntry (DeleteEntryRequest) returns (DeleteEntryResponse) {
  14. }
  15. }
  16. //////////////////////////////////////////////////
  17. message LookupDirectoryEntryRequest {
  18. string directory = 1;
  19. string name = 2;
  20. }
  21. message LookupDirectoryEntryResponse {
  22. Entry entry = 1;
  23. }
  24. message ListEntriesRequest {
  25. string directory = 1;
  26. }
  27. message ListEntriesResponse {
  28. repeated Entry entries = 1;
  29. }
  30. message Entry {
  31. string name = 1;
  32. bool is_directory = 2;
  33. string file_id = 3;
  34. FuseAttributes attributes = 4;
  35. }
  36. message FuseAttributes {
  37. uint64 file_size = 1;
  38. int64 mtime = 2;
  39. uint32 file_mode = 3;
  40. uint32 uid = 4;
  41. uint32 gid = 5;
  42. }
  43. message GetFileAttributesRequest {
  44. string name = 1;
  45. string parent_dir = 2;
  46. string file_id = 3;
  47. }
  48. message GetFileAttributesResponse {
  49. FuseAttributes attributes = 1;
  50. }
  51. message GetFileContentRequest {
  52. string file_id = 1;
  53. }
  54. message GetFileContentResponse {
  55. bytes content = 1;
  56. }
  57. message DeleteEntryRequest {
  58. string directory = 1;
  59. string name = 2;
  60. bool is_directory = 3;
  61. }
  62. message DeleteEntryResponse {
  63. }