分支合并

This commit is contained in:
Hiven
2023-07-28 11:20:12 +08:00
18 changed files with 619 additions and 391 deletions

View File

@@ -12,7 +12,7 @@ import "basic.api"
service product-template-tag {
//获取产品模板标签列表
@handler GetProductTemplateTagsHandler
get /api/product-template/get_product_template_tags(GetProductTemplateTagsReq) returns (response);
get /api/product-template-tag/get_product_template_tags(GetProductTemplateTagsReq) returns (response);
}
//获取产品模板标签列表
@@ -20,6 +20,7 @@ type GetProductTemplateTagsReq {
Limit int `form:"limit"`
}
type GetProductTemplateTagsRsp {
Id int64 `json:"id"`
Tag string `json:"tag"`
Cover string `json:"cover"`
}

View File

@@ -11,41 +11,56 @@ import "basic.api"
service websocket {
//websocket数据交互
@handler DataTransferHandler
get /api/websocket/data_transfer(DataTransferReq) returns (response);
//渲染完了通知接口
get /api/websocket/data_transfer(request) returns (response);
//渲染完了通知接口
@handler RenderNotifyHandler
post /api/websocket/render_notify(RenderNotifyReq) returns (response);
//第三方登录通知接口
@handler ThirdPartyLoginNotifyHandler
post /api/websocket/third_party_login_notify(ThirdPartyLoginNotifyReq) returns (response);
}
//websocket数据交互
type DataTransferReq {
T string `json:"t"` //消息类型
D string `json:"d"` //传递的消息
type DataTransferData {
T string `json:"t"` //消息类型
D interface{} `json:"d"` //传递的消息
}
type DataTransferRsp {
T string `json:"t"` //消息类型
D string `json:"d"` //传递的消息
}
type RenderImageReqMsg { //websocket接受需要云渲染的图片
ProductId int64 `json:"product_id"`
SizeId int64 `json:"size_id"`
TemplateId int64 `json:"template_id"`
type RenderImageReqMsg { //websocket接受要云渲染处理的数据
ProductIds []int64 `json:"product_ids"` //产品 id
TemplateTagId int64 `json:"template_tag_id"` //模板标签id
LogoId int64 `json:"logo_id"` //logoid
AlgorithmVersion string `json:"algorithm_version,optional"` //算法版本
}
type RenderImageRspMsg { //websocket发送渲染完的数据
ProductId int64 `json:"product_id"`
SizeId int64 `json:"size_id"`
TemplateId int64 `json:"template_id"`
Source string `json:"source"`
ProductId int64 `json:"product_id"` //产品 id
TemplateTagId int64 `json:"template_tag_id"` //模板标签id
AlgorithmVersion string `json:"algorithm_version,optional"` //算法版本
LogoId int64 `json:"logo_id"` //logoid
Image string `json:"image"` //渲染后的图片
}
type ThirdPartyLoginRspMsg { //websocket三方登录的通知数据
Token string `json:"token"`
}
//渲染完了通知接口
type RenderNotifyReq {
Sign string `json:"sign"`
Time int64 `json:"time"`
NotifyList []NotifyItem `json:"notify_list"`
Sign string `json:"sign"`
Time int64 `json:"time"`
Info NotifyInfo `json:"info"`
}
type NotifyItem {
ProductId int64 `json:"product_id"`
SizeId int64 `json:"size_id"`
TemplateId int64 `json:"template_id"`
Source string `json:"source"`
type NotifyInfo {
ProductId int64 `json:"product_id"` //产品id
TemplateTagId int64 `json:"template_tag_id"` //模板标签id
AlgorithmVersion string `json:"algorithm_version,optional"` //算法版本
LogoId int64 `json:"logo_id"` //logoid
Image string `json:"image"`
}
//第三方登录通知接口
type ThirdPartyLoginNotifyReq {
Sign string `json:"sign"`
Time int64 `json:"time"`
Info ThirdPartyLoginNotify `json:"info"`
}
type ThirdPartyLoginNotify {
WebsocketId uint64 `json:"websocket_id"`
Token string `json:"token"`
}