2023-08-09 03:46:24 +00:00
|
|
|
syntax = "v1"
|
|
|
|
|
|
|
|
info (
|
|
|
|
title: // TODO: add title
|
|
|
|
desc: // TODO: add description
|
|
|
|
author: ""
|
|
|
|
email: ""
|
|
|
|
)
|
|
|
|
|
|
|
|
import "basic.api"
|
|
|
|
|
2023-08-25 08:46:58 +00:00
|
|
|
// @server(
|
|
|
|
// middleware: Tracing // 路由中间件声明
|
|
|
|
// )
|
|
|
|
|
2023-08-09 03:46:24 +00:00
|
|
|
service resource {
|
|
|
|
@handler LogoCombineHandler
|
|
|
|
post /api/resource/logo-combine(LogoCombineReq) returns (response);
|
2023-08-09 06:18:27 +00:00
|
|
|
|
2023-08-18 09:38:12 +00:00
|
|
|
@handler LogoRemovebgHandler
|
|
|
|
post /api/resource/logo-removebg(LogoRemovebgReq) returns (response);
|
|
|
|
|
2023-08-09 06:18:27 +00:00
|
|
|
@handler ResourceInfoHandler
|
|
|
|
get /api/resource/info(ResourceInfoReq) returns (response);
|
2023-08-30 10:56:06 +00:00
|
|
|
|
|
|
|
@handler LogoResizeHandler
|
|
|
|
post /api/resource/logo-resize(LogoResizeReq) returns (response);
|
2023-08-09 03:46:24 +00:00
|
|
|
}
|
|
|
|
|
2023-08-30 10:56:06 +00:00
|
|
|
type (
|
|
|
|
LogoResizeReq {
|
|
|
|
ResourceId string `form:"resource_id"`
|
|
|
|
Width int64 `form:"width"`
|
|
|
|
Height int64 `form:"height"`
|
|
|
|
}
|
|
|
|
LogoResizeRes struct{}
|
|
|
|
)
|
|
|
|
|
2023-08-18 09:38:12 +00:00
|
|
|
type (
|
|
|
|
LogoRemovebgReq {
|
|
|
|
IsRemoveBg string `form:"is_remove_bg"`
|
|
|
|
LogoFile string `form:"logo_file"`
|
|
|
|
Width string `form:"width"`
|
|
|
|
Height string `form:"height"`
|
2023-08-23 03:09:14 +00:00
|
|
|
Proportion string `form:"proportion"`
|
2023-08-18 09:38:12 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2023-08-09 06:18:27 +00:00
|
|
|
type (
|
|
|
|
ResourceInfoReq {
|
|
|
|
ResourceId string `form:"resource_id,optional"` // 资源ID
|
|
|
|
ResourceKey string `form:"resource_key,optional"` // 资源唯一标识
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2023-08-09 03:46:24 +00:00
|
|
|
type (
|
|
|
|
LogoCombineReq {
|
2023-09-19 07:59:44 +00:00
|
|
|
LogoUrl string `json:"logo_url"` // 合图参数
|
|
|
|
TemplateId int64 `json:"template_id"` // 合图参数
|
|
|
|
TemplateTag string `json:"template_tag"` // 合图参数
|
|
|
|
Color [][]string `json:"color"` // 颜色组合
|
|
|
|
SelectedIndex int `json:"selected_index"` // 主色的下标索引
|
|
|
|
Website string `json:"website,optional"` // 合图参数
|
|
|
|
Slogan string `json:"slogan,optional"` // 合图参数
|
|
|
|
Address string `json:"address,optional"` // 合图参数
|
|
|
|
Phone string `json:"phone,optional"` // 合图参数
|
|
|
|
Qrcode string `json:"qrcode,optional"` // 合图参数
|
2023-08-09 03:46:24 +00:00
|
|
|
}
|
|
|
|
)
|