新增
This commit is contained in:
parent
c5df2b6478
commit
11cf17ef9e
|
@ -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;
|
||||||
|
}
|
|
@ -13,36 +13,64 @@ import "google/protobuf/any.proto";
|
||||||
service resource {
|
service resource {
|
||||||
|
|
||||||
// 获取资源详情
|
// 获取资源详情
|
||||||
rpc GetResourceInfo(GetResourceInfoReq) returns (basic.Response) {
|
rpc GetResourceInfo(GetResourceInfoReq) returns (GetResourceInfoRes) {}
|
||||||
option (google.api.http) = {
|
|
||||||
get: "/api/resource/info"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取资源列表
|
// 获取资源列表
|
||||||
rpc GetResourceList(GetResourceListReq) returns (basic.Response) {
|
rpc GetResourceList(GetResourceListReq) returns (GetResourceListRes) {}
|
||||||
option (google.api.http) = {
|
|
||||||
get: "/api/resource/list"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// 后端上传--单文件
|
// 后端上传--单文件
|
||||||
rpc UploadFileBackend(UploadFileBackendReq) returns (UploadFileBackendRes) {
|
rpc UploadFileBackend(UploadFileBackendReq) returns (UploadFileBackendRes) {}
|
||||||
option (google.api.http) = {
|
|
||||||
post: "/api/resource/upload-file-backend",
|
|
||||||
body: "*"
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// 后端上传--分片上传
|
// 后端上传--分片上传
|
||||||
rpc UploadFileBackendFragment(UploadFileBackendFragmentReq) returns (UploadFileBackendFragmentRes) {
|
rpc UploadFileBackendFragment(UploadFileBackendFragmentReq) returns (UploadFileBackendFragmentRes) {}
|
||||||
option (google.api.http) = {
|
|
||||||
post: "/api/resource/upload-file-backend-fragment",
|
// logo合图
|
||||||
body: "*"
|
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 {
|
message UploadFileBackendFragmentReq {
|
||||||
string file_name = 1; // 文件名
|
string file_name = 1; // 文件名
|
||||||
|
@ -115,6 +143,10 @@ message GetResourceListReq{
|
||||||
optional int64 per_page =102;
|
optional int64 per_page =102;
|
||||||
optional string order_by = 103;
|
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 bucket_name = 8;
|
||||||
optional string source = 9;
|
optional string source = 9;
|
||||||
}
|
}
|
||||||
|
message GetResourceInfoRes{
|
||||||
|
basic.ResourceInfo info =1;
|
||||||
|
}
|
||||||
|
|
||||||
/* 获取资源详情 */
|
/* 获取资源详情 */
|
Loading…
Reference in New Issue
Block a user