合并代码
This commit is contained in:
25
server_api/product-template-tag.api
Normal file
25
server_api/product-template-tag.api
Normal file
@@ -0,0 +1,25 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "产品模板标签服务"// TODO: add title
|
||||
desc: // TODO: add description
|
||||
author: ""
|
||||
email: ""
|
||||
)
|
||||
|
||||
import "basic.api"
|
||||
|
||||
service product-template-tag {
|
||||
//获取产品模板标签列表
|
||||
@handler GetProductTemplateTagsHandler
|
||||
get /api/product-template/get_product_template_tags(GetProductTemplateTagsReq) returns (response);
|
||||
}
|
||||
|
||||
//获取产品模板标签列表
|
||||
type GetProductTemplateTagsReq {
|
||||
Limit int `form:"limit"`
|
||||
}
|
||||
type GetProductTemplateTagsRsp {
|
||||
Tag string `json:"tag"`
|
||||
Cover string `json:"cover"`
|
||||
}
|
||||
@@ -12,14 +12,40 @@ service websocket {
|
||||
//websocket数据交互
|
||||
@handler DataTransferHandler
|
||||
get /api/websocket/data_transfer(DataTransferReq) returns (response);
|
||||
//渲染完了通知接口
|
||||
@handler RenderNotifyHandler
|
||||
post /api/websocket/render_notify(RenderNotifyReq) returns (response);
|
||||
}
|
||||
|
||||
//websocket数据交互
|
||||
type DataTransferReq {
|
||||
MsgType string `json:"msg_type"` //消息类型
|
||||
Message interface{} `json:"message"` //传递的消息
|
||||
T string `json:"t"` //消息类型
|
||||
D string `json:"d"` //传递的消息
|
||||
}
|
||||
type DataTransferRsp {
|
||||
MsgType string `json:"msg_type"` //消息类型
|
||||
Message interface{} `json:"message"` //传递的消息
|
||||
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 RenderImageRspMsg { //websocket发送渲染完的数据
|
||||
ProductId int64 `json:"product_id"`
|
||||
SizeId int64 `json:"size_id"`
|
||||
TemplateId int64 `json:"template_id"`
|
||||
Source string `json:"source"`
|
||||
}
|
||||
//渲染完了通知接口
|
||||
type RenderNotifyReq {
|
||||
Sign string `json:"sign"`
|
||||
Time int64 `json:"time"`
|
||||
NotifyList []NotifyItem `json:"notify_list"`
|
||||
}
|
||||
type NotifyItem {
|
||||
ProductId int64 `json:"product_id"`
|
||||
SizeId int64 `json:"size_id"`
|
||||
TemplateId int64 `json:"template_id"`
|
||||
Source string `json:"source"`
|
||||
}
|
||||
Reference in New Issue
Block a user