feat: ota

This commit is contained in:
zzw
2026-09-22 16:47:38 +08:00
parent fdf5825d83
commit 08b67dba70
26 changed files with 1033 additions and 178 deletions
+25
View File
@@ -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;