新增资源管理

This commit is contained in:
menghaiwen@fusen.cn
2024-01-18 18:23:36 +08:00
parent 2b5688587b
commit 66bdeaee44

View File

@@ -40,35 +40,35 @@ service resource {
// logo缩略处理
rpc LogoResize(LogoResizeReq) returns (LogoResizeRes) {}
}
/* logo缩略处理 */
message LogoResizeReq{
string resource_id=1;
int64 width=2;
int64 height=3;
string resource_id=1; // 资源ID
int64 width=2; // 宽
int64 height=3;// 高
int64 handle_type = 100; // 类型1=缓存 2=重新 3=临时
int64 user_id = 101;
int64 guest_id = 102;
int64 user_id = 101; // 用户ID
int64 guest_id = 102; // 访客ID
}
message LogoResizeRes{
string resource_id=1;
string resource_url=2;
string resource_id=1;// 资源ID
string resource_url=2;// 资源链接
}
/* logo缩略处理 */
/* 更新资源详情 */
message ResourceSaveReq {
optional ResourceFilter filter=1;
optional ResourceFilter save=2;
ResourceFilter filter=1;// 过滤条件
ResourceFilter save=2;// 更新数据
}
message ResourceSaveRes {}
/* 更新资源详情 */
/* 删除资源详情 */
message ResourceDeleteReq {
optional ResourceFilter filter=1;
ResourceFilter filter=1;//过滤条件
int64 delete_type = 12; // 删除类型1=删除数据库 2=删除s3 3=删除数据库+s3
int64 delete_limit = 13; // 删除数量
@@ -79,32 +79,32 @@ message ResourceDeleteRes {}
/* logo裁剪处理 */
message LogoCroppingReq {
string is_remove_bg=1;
string logo_file=2;
string width=3;
string height=4;
string proportion=5;
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;
int64 user_id = 101; // 用户ID
int64 guest_id = 102; // 访客ID
}
message LogoCroppingRes {
string resource_id=1;
string resource_url=2;
bool ismax_proportion=3;
repeated string img_color=4;
string resource_id=1;// 资源ID
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;
string logo_url=1;// logo链接
string version=2; // 算法版本
int64 is_all_template=3; // 是否全部模版
}
message LogoInfoSetRes {
string info =1;
string info =1; // 详情
}
/* logo基础信息 */
@@ -126,8 +126,8 @@ message LogoCombineReq {
repeated TemplateTagGroups template_tag_groups=14;
int64 handle_type = 100; // 类型1=缓存 2=重新 3=临时
int64 user_id = 101;
int64 guest_id = 102;
int64 user_id = 101; // 用户ID
int64 guest_id = 102; // 访客ID
}
message TemplateTagColor {
repeated Color color =1;
@@ -143,8 +143,8 @@ message TemplateTagGroups {
int64 fixed =4;
}
message LogoCombineRes {
string resource_id = 4;
string resource_url = 6;
string resource_id = 4; // 资源ID
string resource_url = 6; // 资源链接
int64 diff_time_logo_combine=15; // 合图算法时间
int64 diff_time_upload_file=16; // 合图上传时间
}
@@ -175,9 +175,9 @@ message UploadFileBackendFragmentReq {
int64 guest_id = 102;
}
message UploadFileBackendFragmentRes {
string resource_type = 5;
string resource_id = 4;
string resource_url = 6;
string resource_type = 5; // 资源类型
string resource_id = 4;// 资源ID
string resource_url = 6;// 资源链接
}
/* 后端上传--分片上传 */
@@ -199,52 +199,55 @@ message UploadFileBackendReq {
string upload_type = 18; // 上传方式s3
int64 CacheType = 100; // 缓存类型0=不缓存 1=存储数据库
int64 user_id = 101;
int64 guest_id = 102;
int64 user_id = 101; // 用户ID
int64 guest_id = 102;// 访客ID
}
message UploadFileBackendRes{
string resource_type = 5;
string resource_id = 4;
string resource_url = 6;
string resource_type = 5;// 资源类型
string resource_id = 4;// 资源ID
string resource_url = 6;// 资源链接
}
/* 后端上传--文件流--单文件 */
/* 获取资源列表 */
message ResourceListReq{
optional ResourceFilter filter=1;
ResourceFilter filter=1;// 筛选条件
optional int64 current_page =101;
optional int64 per_page =102;
optional string order_by = 103;
int64 current_page =101; // 当前页码
int64 per_page =102; // 每页数量
string order_by = 103; // 排序
}
message ResourceListRes{
repeated basic.ResourceInfo list=1;
basic.Meta meta =2;
repeated basic.ResourceInfo list=1; // 列表数据
basic.Meta meta =2; // 列表参数
}
/* 获取资源列表 */
/* 获取资源详情 */
message ResourceInfoReq{
optional ResourceFilter filter=1;
ResourceFilter filter=1; // 筛选条件
}
message ResourceInfoRes{
basic.ResourceInfo info =1;
basic.ResourceInfo info =1;// 详情数据
}
message ResourceFilter {
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;
optional google.protobuf.Struct filters= 10; // 其他过滤条件
optional ResourceIds resource_ids =11; // 资源ID列表
optional string metadata = 12;
optional string resource_id = 1; // 资源ID
optional int64 guest_id =2; // 用户ID
optional int64 user_id =3; // 访客ID
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; // 渠道
optional bytes metadata = 10; // 额外参数
optional string trace_id = 11; // 链路ID
optional bytes other_filter = 101; // 其他筛选条件
repeated string resource_ids = 102; // 资源IDs
}
message ResourceIds {