Merge branch 'master' of ssh://gitlab.fusenpack.com/backend/proto

This commit is contained in:
huangsimin@fusen.cn
2024-01-24 11:04:11 +08:00
3 changed files with 101 additions and 39 deletions

View File

@@ -35,5 +35,4 @@ message Meta {
int64 page_count=2;
int64 current_page=3;
int64 per_page=4;
}
}

View File

@@ -40,7 +40,8 @@ service ldap {
rpc GetLdapUsers(GetLdapUsersReq) returns (GetLdapUsersRsp) {}
//登录
rpc LdapUserLogin(LdapUserLoginReq) returns (LdapUserLoginRsp) {}
//解析token
rpc LdapParseToken(LdapParseTokenReq) returns (LdapParseTokenRsp) {}
//获取权限组列表
rpc GetLdapGroups(GetLdapGroupsReq) returns (GetLdapGroupsRsp);
@@ -292,4 +293,13 @@ message LdapUserLoginReq{
}
message LdapUserLoginRsp{
string token = 1;
}
//解析token
message LdapParseTokenReq{
string token = 1;
}
message LdapParseTokenRsp{
string UserDn = 1;
int64 UserId = 2;
string UserEmail = 3;
}

View File

@@ -5,6 +5,7 @@ option go_package = "gitlab.fusenpack.com/backend/resource;service";
// 导入google/api/annotations.proto 注释依赖
import "service/basic.proto";
import "service/auth.proto";
//定义服务
service resource {
@@ -27,18 +28,56 @@ service resource {
rpc UploadFileBackendFragment(UploadFileBackendFragmentReq) returns (UploadFileBackendFragmentRes) {}
// logo合图
rpc LogoCombine(LogoCombineReq) returns (LogoCombineRes) {}
rpc LogoAiCombine(LogoAiCombineReq) returns (LogoAiCombineRes) {}
// logo基础信息
rpc LogoInfoSet(LogoInfoSetReq) returns (LogoInfoSetRes) {}
// logo裁剪处理
rpc LogoCropping(LogoCroppingReq) returns (LogoCroppingRes) {}
rpc LogoAiCropping(LogoAiCroppingReq) returns (LogoAiCroppingRes) {}
// logo缩略处理
rpc LogoResize(LogoResizeReq) returns (LogoResizeRes) {}
// logo算法信息提取
rpc LogoAiInfoGet(LogoAiInfoGetReq) returns (LogoAiInfoGetRes) {}
// 设置示例logo
rpc SetExampleLogo(SetExampleLogoReq) returns (SetExampleLogoRes) {}
}
/* 设置示例logo */
message SetExampleLogoReq {
int64 is_example = 1;
int64 logo_id = 2;
}
message SetExampleLogoRes {
}
/* 设置示例logo */
/* logo算法信息提取 */
message LogoAiInfoGetReq {
string logo_url = 1;// logo地址
optional int64 logo_id = 2;// logoID
optional string version = 3;// 算法版本
optional string is_reverse = 4; // 是否反白
optional string logo_crop_type = 5; // 可拆类型
optional int64 is_all_template = 7; // 是否全部模版
repeated string recommend_templates = 6; // 推荐模版
bytes preprocess_logo_metadata = 8; // logo数据库额外参数
optional int64 user_id = 101; // 用户ID
optional int64 guest_id = 102; // 访客ID
optional string get_type = 103; // 获取类型user_material=用户素材 temporary =临时
}
message LogoAiInfoGetRes {
bytes metadata =1; // AI返回基础信息--logo
bytes metadata_preprocess_logo =2; // AI返回基础信息--logo数据库
}
/* logo算法信息提取 */
/* logo缩略处理 */
message LogoResizeReq{
string resource_id=1; // 资源ID
@@ -75,7 +114,7 @@ message ResourceDeleteRes {}
/* 删除资源详情 */
/* logo裁剪处理 */
message LogoCroppingReq {
message LogoAiCroppingReq {
string is_remove_bg=1; //是否去背景
string logo_file=2; // 资源
string width=3; // 宽
@@ -86,7 +125,7 @@ message LogoCroppingReq {
int64 user_id = 101; // 用户ID
int64 guest_id = 102; // 访客ID
}
message LogoCroppingRes {
message LogoAiCroppingRes {
string resource_id=1;// 资源ID
string resource_url=2;// 资源链接
bool ismax_proportion=3; // 最大
@@ -106,26 +145,33 @@ message LogoInfoSetRes {
/* logo基础信息 */
/* 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;
message LogoAiCombineReq {
optional string logo_url = 1; // logo资源链接
optional int64 logo_material_id = 2; // logo素材ID
optional bytes logo_material_metadata = 3; // logo素材额外参数
optional int64 preprocess_logo_id = 4; // logo数据库ID
int64 handle_type = 100; // 类型1=缓存 2=重新 3=临时
int64 user_id = 101; // 用户ID
int64 guest_id = 102; // 访客ID
optional string template_tag = 5; // 模版标签
optional bytes template_tag_color = 6; // 模版标签颜色
optional bytes product_template_v2_info = 7; // 商品模版详情
optional bytes product_template_tag_groups = 8; // 商品模版标签组信息
optional string resolution = 9; // 合图分辨率
optional string slogan = 10; // 合图Slogan
optional string website = 11; // 合图网站
optional string address = 12; // 合图地址
optional string phone = 13; // 合图电话号码
optional string qrcode = 14; // 合图二维码
auth.Debug debug = 100; // 调试模式
int64 handle_type = 101; // 类型1=缓存 2=重新 3=临时
int64 user_id = 102; // 用户ID
int64 guest_id = 103; // 访客ID
string trace_id = 104; // 业务链路
string resource_source = 105; // 资源来源
}
message TemplateTagColor {
repeated Color color =1;
int64 index = 2;
@@ -139,7 +185,7 @@ message TemplateTagGroups {
string value =3;
int64 fixed =4;
}
message LogoCombineRes {
message LogoAiCombineRes {
string resource_id = 4; // 资源ID
string resource_url = 6; // 资源链接
int64 diff_time_logo_combine=15; // 合图算法时间
@@ -151,38 +197,45 @@ message LogoCombineRes {
/* 后端上传--分片上传 */
message UploadFileBackendFragmentReq {
string file_name = 1; // 文件名
string file_type = 2; // 文件类型
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
string file_key = 6; // 哈希
int64 api_type = 10; // 请求类型1=对外2=对内
int64 upload_bucket = 11; // 上传桶类型1=持久2=缓存
string file_key = 12; // 哈希
string source = 13;// 来源
bytes metadata = 14; // json格式
int64 chunk_number = 7; // 当前分片号:1、2、3
int64 total_chunks = 8; // 总分片数:3
int64 upload_bucket = 10; // 上传桶类型1=持久2=缓存
string upload_type = 11; // 上传方式s3
string upload_id = 12; // 分片上传id
int64 api_type = 13; // 请求类型1=对外2=对内
string source = 14;// 来源
int64 refresh = 15; // 是否覆盖
string resource_id = 16; // 资源ID
string backup_type = 17; // 资源备份oss
string upload_type = 18; // 上传方式s3
bytes metadata = 18; // json格式
int64 content_length = 19; // json格式
int64 cache_type = 100; // 缓存类型0=不缓存 1=存储数据库
int64 user_id = 101;
int64 guest_id = 102;
}
message UploadFileBackendFragmentRes {
string resource_type = 5; // 资源类型
string resource_id = 4;// 资源ID
string resource_url = 6;// 资源链接
string upload_id = 1; // 分片上传id
string resource_type = 2; // 资源类型
string resource_id = 3;// 资源ID
string resource_url = 4;// 资源链接
}
/* 后端上传--分片上传 */
/* 后端上传--单文件 */
message UploadFileBackendReq {
string file_name = 1; // 文件名
bytes file_content = 2; // 文件
bytes file_header = 3; // 文件
string file_type = 2; // 文件类型
bytes file_content = 3; // 文件
bytes file_header = 4; // 文件头
string file_data = 6; // base64
int64 api_type = 10; // 请求类型1=对外2=对内