This commit is contained in:
menghaiwen@fusen.cn 2023-12-06 18:34:22 +08:00
parent c5df2b6478
commit 11cf17ef9e
2 changed files with 78 additions and 23 deletions

View File

@ -17,4 +17,23 @@ message Response {
}
message ResourceInfo{
string resource_id = 1;
int64 guest_id =2;
int64 user_id =3;
string resource_type = 4;
string resource_url = 5;
string version = 6;
int64 api_type = 7;
string bucket_name = 8;
string source = 9;
string uploaded_at = 10;
google.protobuf.Struct metadata = 11;
}
message Meta {
int64 total_count =1;
int64 page_count=2;
int64 current_page=3;
int64 per_page=4;
}

View File

@ -13,36 +13,64 @@ import "google/protobuf/any.proto";
service resource {
//
rpc GetResourceInfo(GetResourceInfoReq) returns (basic.Response) {
option (google.api.http) = {
get: "/api/resource/info"
};
}
rpc GetResourceInfo(GetResourceInfoReq) returns (GetResourceInfoRes) {}
//
rpc GetResourceList(GetResourceListReq) returns (basic.Response) {
option (google.api.http) = {
get: "/api/resource/list"
};
}
rpc GetResourceList(GetResourceListReq) returns (GetResourceListRes) {}
// --
rpc UploadFileBackend(UploadFileBackendReq) returns (UploadFileBackendRes) {
option (google.api.http) = {
post: "/api/resource/upload-file-backend",
body: "*"
};
}
rpc UploadFileBackend(UploadFileBackendReq) returns (UploadFileBackendRes) {}
// --
rpc UploadFileBackendFragment(UploadFileBackendFragmentReq) returns (UploadFileBackendFragmentRes) {
option (google.api.http) = {
post: "/api/resource/upload-file-backend-fragment",
body: "*"
};
}
rpc UploadFileBackendFragment(UploadFileBackendFragmentReq) returns (UploadFileBackendFragmentRes) {}
// logo合图
rpc LogoCombine(LogoCombineReq) returns (LogoCombineRes) {}
}
/* logo合图 */
message LogoCombineReq {
int64 product_template_v2_info_id =1;
string product_template_v2_info_material_img =2;
string product_template_v2_info_template_info =3;
string template_tag =4;
string website=5;
string slogan=6;
string address=7;
string phone=8;
string qrcode=9;
string logo_url=10;
string resolution=11;
TemplateTagColor template_tag_color=12;
string logo_metadata=13;
repeated TemplateTagGroups template_tag_groups=14;
int64 combine_type = 100; // 1= 2= 3=
int64 user_id = 101;
int64 guest_id = 102;
}
message TemplateTagColor {
repeated Color color =1;
int64 index = 2;
}
message Color {
repeated string names = 1;
}
message TemplateTagGroups {
string tag =1;
string name =2;
string value =3;
int64 fixed =4;
}
message LogoCombineRes {
string resource_id = 4;
string resource_url = 6;
int64 diff_time_logo_combine=15; //
int64 diff_time_upload_file=16; //
}
/* logo合图 */
/* 后端上传--分片上传 */
message UploadFileBackendFragmentReq {
string file_name = 1; //
@ -115,6 +143,10 @@ message GetResourceListReq{
optional int64 per_page =102;
optional string order_by = 103;
}
message GetResourceListRes{
repeated basic.ResourceInfo list=1;
basic.Meta meta =2;
}
/* 获取资源列表 */
/* 获取资源详情 */
@ -129,4 +161,8 @@ message GetResourceInfoReq{
optional string bucket_name = 8;
optional string source = 9;
}
message GetResourceInfoRes{
basic.ResourceInfo info =1;
}
/* 获取资源详情 */