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
commit 8008fd4ddb
3 changed files with 101 additions and 39 deletions

View File

@ -36,4 +36,3 @@ message Meta {
int64 current_page=3; int64 current_page=3;
int64 per_page=4; int64 per_page=4;
} }

View File

@ -40,7 +40,8 @@ service ldap {
rpc GetLdapUsers(GetLdapUsersReq) returns (GetLdapUsersRsp) {} rpc GetLdapUsers(GetLdapUsersReq) returns (GetLdapUsersRsp) {}
// //
rpc LdapUserLogin(LdapUserLoginReq) returns (LdapUserLoginRsp) {} rpc LdapUserLogin(LdapUserLoginReq) returns (LdapUserLoginRsp) {}
//token
rpc LdapParseToken(LdapParseTokenReq) returns (LdapParseTokenRsp) {}
// //
rpc GetLdapGroups(GetLdapGroupsReq) returns (GetLdapGroupsRsp); rpc GetLdapGroups(GetLdapGroupsReq) returns (GetLdapGroupsRsp);
@ -293,3 +294,12 @@ message LdapUserLoginReq{
message LdapUserLoginRsp{ message LdapUserLoginRsp{
string token = 1; 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 // google/api/annotations.proto
import "service/basic.proto"; import "service/basic.proto";
import "service/auth.proto";
// //
service resource { service resource {
@ -27,18 +28,56 @@ service resource {
rpc UploadFileBackendFragment(UploadFileBackendFragmentReq) returns (UploadFileBackendFragmentRes) {} rpc UploadFileBackendFragment(UploadFileBackendFragmentReq) returns (UploadFileBackendFragmentRes) {}
// logo合图 // logo合图
rpc LogoCombine(LogoCombineReq) returns (LogoCombineRes) {} rpc LogoAiCombine(LogoAiCombineReq) returns (LogoAiCombineRes) {}
// logo基础信息 // logo基础信息
rpc LogoInfoSet(LogoInfoSetReq) returns (LogoInfoSetRes) {} rpc LogoInfoSet(LogoInfoSetReq) returns (LogoInfoSetRes) {}
// logo裁剪处理 // logo裁剪处理
rpc LogoCropping(LogoCroppingReq) returns (LogoCroppingRes) {} rpc LogoAiCropping(LogoAiCroppingReq) returns (LogoAiCroppingRes) {}
// logo缩略处理 // logo缩略处理
rpc LogoResize(LogoResizeReq) returns (LogoResizeRes) {} 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缩略处理 */ /* logo缩略处理 */
message LogoResizeReq{ message LogoResizeReq{
string resource_id=1; // ID string resource_id=1; // ID
@ -75,7 +114,7 @@ message ResourceDeleteRes {}
/* 删除资源详情 */ /* 删除资源详情 */
/* logo裁剪处理 */ /* logo裁剪处理 */
message LogoCroppingReq { message LogoAiCroppingReq {
string is_remove_bg=1; // string is_remove_bg=1; //
string logo_file=2; // string logo_file=2; //
string width=3; // string width=3; //
@ -86,7 +125,7 @@ message LogoCroppingReq {
int64 user_id = 101; // ID int64 user_id = 101; // ID
int64 guest_id = 102; // 访ID int64 guest_id = 102; // 访ID
} }
message LogoCroppingRes { message LogoAiCroppingRes {
string resource_id=1;// ID string resource_id=1;// ID
string resource_url=2;// string resource_url=2;//
bool ismax_proportion=3; // bool ismax_proportion=3; //
@ -106,26 +145,33 @@ message LogoInfoSetRes {
/* logo基础信息 */ /* logo基础信息 */
/* logo合图 */ /* logo合图 */
message LogoCombineReq { message LogoAiCombineReq {
int64 product_template_v2_info_id =1; optional string logo_url = 1; // logo资源链接
string product_template_v2_info_material_img =2; optional int64 logo_material_id = 2; // logo素材ID
string product_template_v2_info_template_info =3; optional bytes logo_material_metadata = 3; // logo素材额外参数
string template_tag =4; optional int64 preprocess_logo_id = 4; // logo数据库ID
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 handle_type = 100; // 1= 2= 3= optional string template_tag = 5; //
int64 user_id = 101; // ID optional bytes template_tag_color = 6; //
int64 guest_id = 102; // 访ID
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 { message TemplateTagColor {
repeated Color color =1; repeated Color color =1;
int64 index = 2; int64 index = 2;
@ -139,7 +185,7 @@ message TemplateTagGroups {
string value =3; string value =3;
int64 fixed =4; int64 fixed =4;
} }
message LogoCombineRes { message LogoAiCombineRes {
string resource_id = 4; // ID string resource_id = 4; // ID
string resource_url = 6; // string resource_url = 6; //
int64 diff_time_logo_combine=15; // int64 diff_time_logo_combine=15; //
@ -151,38 +197,45 @@ message LogoCombineRes {
/* 后端上传--分片上传 */ /* 后端上传--分片上传 */
message UploadFileBackendFragmentReq { message UploadFileBackendFragmentReq {
string file_name = 1; // string file_name = 1; //
string file_type = 2; //
bytes file_content = 3; // bytes file_content = 3; //
bytes file_header = 4; // bytes file_header = 4; //
string file_data = 5; // base64 string file_data = 5; // base64
int64 chunk_number = 6; // :123 string file_key = 6; //
int64 total_chunks = 7; // :3
int64 api_type = 10; // 1=2= int64 chunk_number = 7; // :123
int64 upload_bucket = 11; // 1=2= int64 total_chunks = 8; // :3
string file_key = 12; //
string source = 13;//
bytes metadata = 14; // json格式 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; // int64 refresh = 15; //
string resource_id = 16; // ID string resource_id = 16; // ID
string backup_type = 17; // oss 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 cache_type = 100; // 0= 1=
int64 user_id = 101; int64 user_id = 101;
int64 guest_id = 102; int64 guest_id = 102;
} }
message UploadFileBackendFragmentRes { message UploadFileBackendFragmentRes {
string resource_type = 5; // string upload_id = 1; // id
string resource_id = 4;// ID string resource_type = 2; //
string resource_url = 6;// string resource_id = 3;// ID
string resource_url = 4;//
} }
/* 后端上传--分片上传 */ /* 后端上传--分片上传 */
/* 后端上传--单文件 */ /* 后端上传--单文件 */
message UploadFileBackendReq { message UploadFileBackendReq {
string file_name = 1; // string file_name = 1; //
bytes file_content = 2; // string file_type = 2; //
bytes file_header = 3; // bytes file_content = 3; //
bytes file_header = 4; //
string file_data = 6; // base64 string file_data = 6; // base64
int64 api_type = 10; // 1=2= int64 api_type = 10; // 1=2=