feat: ota
This commit is contained in:
@@ -11,6 +11,15 @@ service Chore {
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// 对外:服务端直传 OSS
|
||||
rpc Upload(UploadReq) returns (Response) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v3/chore/oss/upload"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// 对内:服务间直传 OSS(无 HTTP 暴露)
|
||||
rpc InternalUpload(InternalUploadReq) returns (InternalUploadData);
|
||||
rpc Test(TestReq) returns (Response) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v3/chore/test"
|
||||
@@ -120,6 +129,22 @@ message PolicyReq {
|
||||
string key = 1;
|
||||
}
|
||||
|
||||
message UploadReq {
|
||||
string filename = 1;
|
||||
bytes content = 2;
|
||||
}
|
||||
|
||||
message InternalUploadReq {
|
||||
string filename = 1;
|
||||
bytes content = 2;
|
||||
}
|
||||
|
||||
message InternalUploadData {
|
||||
string url = 1;
|
||||
string path = 2;
|
||||
string host = 3;
|
||||
}
|
||||
|
||||
message TestReq {
|
||||
int32 id = 1;
|
||||
repeated int64 ids = 2;
|
||||
|
||||
Reference in New Issue
Block a user