新增
This commit is contained in:
parent
47317af003
commit
2fb38a42a1
|
@ -18,16 +18,16 @@ 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;
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,12 +11,17 @@ import "google/protobuf/any.proto";
|
|||
|
||||
//定义服务
|
||||
service resource {
|
||||
// 删除资源详情
|
||||
rpc ResourceDelete(ResourceDeleteReq) returns (ResourceDeleteRes) {}
|
||||
|
||||
// 更新资源详情
|
||||
rpc ResourceSave(ResourceSaveReq) returns (ResourceSaveRes) {}
|
||||
|
||||
// 获取资源详情
|
||||
rpc GetResourceInfo(GetResourceInfoReq) returns (GetResourceInfoRes) {}
|
||||
rpc ResourceInfo(ResourceInfoReq) returns (ResourceInfoRes) {}
|
||||
|
||||
// 获取资源列表
|
||||
rpc GetResourceList(GetResourceListReq) returns (GetResourceListRes) {}
|
||||
rpc ResourceList(ResourceListReq) returns (ResourceListRes) {}
|
||||
|
||||
// 后端上传--单文件
|
||||
rpc UploadFileBackend(UploadFileBackendReq) returns (UploadFileBackendRes) {}
|
||||
|
@ -26,7 +31,62 @@ service resource {
|
|||
|
||||
// logo合图
|
||||
rpc LogoCombine(LogoCombineReq) returns (LogoCombineRes) {}
|
||||
|
||||
// logo基础信息
|
||||
rpc LogoInfoSet(LogoInfoSetReq) returns (LogoInfoSetRes) {}
|
||||
|
||||
// logo裁剪处理
|
||||
rpc LogoCropping(LogoCroppingReq) returns (LogoCroppingRes) {}
|
||||
}
|
||||
/* 更新资源详情 */
|
||||
message ResourceSaveReq {
|
||||
optional ResourceFilter filter=1;
|
||||
optional ResourceFilter save=2;
|
||||
}
|
||||
message ResourceSaveRes {}
|
||||
/* 更新资源详情 */
|
||||
|
||||
/* 删除资源详情 */
|
||||
message ResourceDeleteReq {
|
||||
optional ResourceFilter filter=1;
|
||||
|
||||
int64 delete_type = 12; // 删除类型:1=删除数据库 2=删除s3 3=删除数据库+s3
|
||||
int64 delete_limit = 13; // 删除数量
|
||||
}
|
||||
|
||||
message ResourceDeleteRes {}
|
||||
/* 删除资源详情 */
|
||||
|
||||
/* logo裁剪处理 */
|
||||
message LogoCroppingReq {
|
||||
string is_remove_bg=1;
|
||||
string logo_file=2;
|
||||
string width=3;
|
||||
string height=4;
|
||||
string proportion=5;
|
||||
|
||||
int64 handle_type = 100; // 类型:1=缓存 2=重新 3=临时
|
||||
int64 user_id = 101;
|
||||
int64 guest_id = 102;
|
||||
}
|
||||
message LogoCroppingRes {
|
||||
string resource_id=1;
|
||||
string resource_url=2;
|
||||
bool ismax_proportion=3;
|
||||
repeated string img_color=4;
|
||||
}
|
||||
/* logo裁剪处理 */
|
||||
|
||||
/* logo基础信息 */
|
||||
message LogoInfoSetReq {
|
||||
string logo_url=1;
|
||||
string version=2;
|
||||
int64 is_all_template=3;
|
||||
}
|
||||
message LogoInfoSetRes {
|
||||
string info =1;
|
||||
}
|
||||
/* logo基础信息 */
|
||||
|
||||
/* logo合图 */
|
||||
message LogoCombineReq {
|
||||
|
@ -45,7 +105,7 @@ message LogoCombineReq {
|
|||
string logo_metadata=13;
|
||||
repeated TemplateTagGroups template_tag_groups=14;
|
||||
|
||||
int64 combine_type = 100; // 合图类型:1=缓存合图 2=重新合图 3=临时合图
|
||||
int64 handle_type = 100; // 类型:1=缓存 2=重新 3=临时
|
||||
int64 user_id = 101;
|
||||
int64 guest_id = 102;
|
||||
}
|
||||
|
@ -63,10 +123,10 @@ message TemplateTagGroups {
|
|||
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; // 合图上传时间
|
||||
string resource_id = 4;
|
||||
string resource_url = 6;
|
||||
int64 diff_time_logo_combine=15; // 合图算法时间
|
||||
int64 diff_time_upload_file=16; // 合图上传时间
|
||||
}
|
||||
/* logo合图 */
|
||||
|
||||
|
@ -74,17 +134,14 @@ message LogoCombineRes {
|
|||
/* 后端上传--分片上传 */
|
||||
message UploadFileBackendFragmentReq {
|
||||
string file_name = 1; // 文件名
|
||||
bytes file_content = 2; // 文件流
|
||||
bytes file_header = 3; // 文件头
|
||||
string file_data = 4; // base64
|
||||
bytes file_content = 3; // 文件流
|
||||
bytes file_header = 4; // 文件头
|
||||
string file_data = 5; // base64
|
||||
int64 chunk_number = 6; // 当前分片号:1、2、3
|
||||
int64 total_chunks = 7; // 总分片数:3
|
||||
|
||||
int64 chunk_number = 5; // 当前分片号:1、2、3
|
||||
int64 total_chunks = 6; // 总分片数:3
|
||||
int64 user_id = 7;
|
||||
int64 guest_id = 8;
|
||||
|
||||
int64 api_type = 10; // 请求类型:1=对外,2=对内'
|
||||
int64 upload_bucket = 11; // 上传桶类型
|
||||
int64 api_type = 10; // 请求类型:1=对外,2=对内
|
||||
int64 upload_bucket = 11; // 上传桶类型:1=持久,2=缓存
|
||||
string file_key = 12; // 哈希
|
||||
string source = 13;// 来源
|
||||
string metadata = 14; // json格式
|
||||
|
@ -92,6 +149,10 @@ message UploadFileBackendFragmentReq {
|
|||
string resource_id = 16; // 资源ID
|
||||
string backup_type = 17; // 资源备份:oss
|
||||
string upload_type = 18; // 上传方式:s3
|
||||
|
||||
int64 CacheType = 100; // 缓存类型:0=不缓存 1=存储数据库
|
||||
int64 user_id = 101;
|
||||
int64 guest_id = 102;
|
||||
}
|
||||
message UploadFileBackendFragmentRes {
|
||||
string resource_type = 5;
|
||||
|
@ -105,12 +166,10 @@ message UploadFileBackendReq {
|
|||
string file_name = 1; // 文件名
|
||||
bytes file_content = 2; // 文件流
|
||||
bytes file_header = 3; // 文件头
|
||||
int64 user_id = 4;
|
||||
int64 guest_id = 5;
|
||||
string file_data = 6; // base64
|
||||
|
||||
int64 api_type = 10; // 请求类型:1=对外,2=对内'
|
||||
int64 upload_bucket = 11; // 上传桶类型
|
||||
int64 api_type = 10; // 请求类型:1=对外,2=对内
|
||||
int64 upload_bucket = 11; // 上传桶类型:1=持久,2=缓存
|
||||
string file_key = 12; // 哈希
|
||||
string source = 13;// 来源
|
||||
string metadata = 14; // json格式
|
||||
|
@ -118,6 +177,10 @@ message UploadFileBackendReq {
|
|||
string resource_id = 16; // 资源ID
|
||||
string backup_type = 17; // 资源备份:oss
|
||||
string upload_type = 18; // 上传方式:s3
|
||||
|
||||
int64 CacheType = 100; // 缓存类型:0=不缓存 1=存储数据库
|
||||
int64 user_id = 101;
|
||||
int64 guest_id = 102;
|
||||
}
|
||||
|
||||
message UploadFileBackendRes{
|
||||
|
@ -128,29 +191,28 @@ message UploadFileBackendRes{
|
|||
/* 后端上传--文件流--单文件 */
|
||||
|
||||
/* 获取资源列表 */
|
||||
message GetResourceListReq{
|
||||
optional string resource_id = 1;
|
||||
optional int64 guest_id =2;
|
||||
optional int64 user_id =3;
|
||||
optional string resource_type = 4;
|
||||
optional string resource_url = 5;
|
||||
optional string version = 6;
|
||||
optional int64 api_type = 7;
|
||||
optional string bucket_name = 8;
|
||||
optional string source = 9;
|
||||
message ResourceListReq{
|
||||
optional ResourceFilter filter=1;
|
||||
|
||||
optional int64 current_page =101;
|
||||
optional int64 per_page =102;
|
||||
optional string order_by = 103;
|
||||
}
|
||||
message GetResourceListRes{
|
||||
message ResourceListRes{
|
||||
repeated basic.ResourceInfo list=1;
|
||||
basic.Meta meta =2;
|
||||
}
|
||||
/* 获取资源列表 */
|
||||
|
||||
/* 获取资源详情 */
|
||||
message GetResourceInfoReq{
|
||||
message ResourceInfoReq{
|
||||
optional ResourceFilter filter=1;
|
||||
}
|
||||
message ResourceInfoRes{
|
||||
basic.ResourceInfo info =1;
|
||||
}
|
||||
|
||||
message ResourceFilter {
|
||||
optional string resource_id = 1;
|
||||
optional int64 guest_id =2;
|
||||
optional int64 user_id =3;
|
||||
|
@ -160,9 +222,13 @@ message GetResourceInfoReq{
|
|||
optional int64 api_type = 7;
|
||||
optional string bucket_name = 8;
|
||||
optional string source = 9;
|
||||
optional google.protobuf.Struct filters= 10; // 其他过滤条件
|
||||
optional ResourceIds resource_ids =11; // 资源ID列表
|
||||
optional string metadata = 12;
|
||||
}
|
||||
message GetResourceInfoRes{
|
||||
basic.ResourceInfo info =1;
|
||||
|
||||
message ResourceIds {
|
||||
repeated string resource_id = 1;
|
||||
}
|
||||
|
||||
/* 获取资源详情 */
|
Loading…
Reference in New Issue
Block a user