Skip to content

Commit

Permalink
Feat: init webdav
Browse files Browse the repository at this point in the history
  • Loading branch information
zijiren233 committed May 8, 2024
1 parent 898d00f commit 2526fdd
Show file tree
Hide file tree
Showing 16 changed files with 1,892 additions and 121 deletions.
981 changes: 981 additions & 0 deletions api/webdav/webdav.pb.go

Large diffs are not rendered by default.

98 changes: 98 additions & 0 deletions api/webdav/webdav.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
syntax = "proto3";

package api.webdav;

option go_package = "github.com/synctv-org/vendors/api/webdav;webdav";
option java_multiple_files = true;
option java_package = "api.webdav";

import "google/api/annotations.proto";

service Webdav {
rpc FsGet(FsGetReq) returns (FsGetResp) {
option (google.api.http) = {
post : "/fs/get"
body : "*"
};
};
rpc FsList(FsListReq) returns (FsListResp) {
option (google.api.http) = {
post : "/fs/list"
body : "*"
};
};
rpc FsSearch(FsSearchReq) returns (FsSearchResp) {
option (google.api.http) = {
post : "/fs/search"
body : "*"
};
};
rpc FsTest(FsTestReq) returns (Empty) {
option (google.api.http) = {
post : "/fs/test"
body : "*"
};
};
}

message Empty {}

message FsTestReq {
string host = 1;
string username = 2;
string password = 3;
}

message FsGetReq {
string host = 1;
string username = 2;
string password = 3;
string path = 4;
}

message FsGetResp {
string name = 1;
int64 size = 2;
bool isDir = 3;
int64 modified = 4;
}

message FsListReq {
string host = 1;
string username = 2;
string password = 3;
string path = 4;
uint64 page = 5;
uint64 perPage = 6;
}

message FsListResp {
message FsListContent {
string name = 1;
int64 size = 2;
bool isDir = 3;
int64 modified = 4;
}
repeated FsListContent content = 1;
uint64 total = 2;
}

message FsSearchReq {
string host = 1;
string username = 2;
string password = 3;
string path = 4;
string keywords = 5;
uint64 page = 6;
uint64 perPage = 7;
}

message FsSearchResp {
message FsSearchContent {
string name = 1;
bool isDir = 2;
int64 size = 3;
}
repeated FsSearchContent content = 1;
uint64 total = 2;
}
220 changes: 220 additions & 0 deletions api/webdav/webdav_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2526fdd

Please sign in to comment.