54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
syntax = "v1"
|
|
|
|
info (
|
|
title: // TODO: add title
|
|
desc: // TODO: add description
|
|
author: ""
|
|
email: ""
|
|
)
|
|
|
|
import "basic.api"
|
|
|
|
// @server(
|
|
// middleware: Tracing // 路由中间件声明
|
|
// )
|
|
|
|
service resource {
|
|
@handler LogoCombineHandler
|
|
post /api/resource/logo-combine(LogoCombineReq) returns (response);
|
|
|
|
@handler LogoRemovebgHandler
|
|
post /api/resource/logo-removebg(LogoRemovebgReq) returns (response);
|
|
|
|
@handler ResourceInfoHandler
|
|
get /api/resource/info(ResourceInfoReq) returns (response);
|
|
}
|
|
|
|
type (
|
|
LogoRemovebgReq {
|
|
IsRemoveBg string `form:"is_remove_bg"`
|
|
LogoFile string `form:"logo_file"`
|
|
Width string `form:"width"`
|
|
Height string `form:"height"`
|
|
Proportion string `form:"proportion"`
|
|
}
|
|
)
|
|
|
|
type (
|
|
ResourceInfoReq {
|
|
ResourceId string `form:"resource_id,optional"` // 资源ID
|
|
ResourceKey string `form:"resource_key,optional"` // 资源唯一标识
|
|
}
|
|
)
|
|
|
|
type (
|
|
LogoCombineReq {
|
|
TemplateId int64 `form:"template_id"` // 合图参数
|
|
TemplateTag string `form:"template_tag"` // 合图参数
|
|
Website string `form:"website,optional"` // 合图参数
|
|
Slogan string `form:"slogan,optional"` // 合图参数
|
|
Address string `form:"address,optional"` // 合图参数
|
|
Phone string `form:"phone,optional"` // 合图参数
|
|
Qrcode string `form:"qrcode,optional"` // 合图参数
|
|
}
|
|
) |