fix
This commit is contained in:
25
server_api/websocket.api
Normal file
25
server_api/websocket.api
Normal file
@@ -0,0 +1,25 @@
|
||||
syntax = "v1"
|
||||
|
||||
info (
|
||||
title: "websocket"// TODO: add title
|
||||
desc: // TODO: add description
|
||||
author: ""
|
||||
email: ""
|
||||
)
|
||||
|
||||
import "basic.api"
|
||||
service websocket {
|
||||
//websocket数据交互
|
||||
@handler DataTransferHandler
|
||||
get /api/websocket/data_transfer(DataTransferReq) returns (response);
|
||||
}
|
||||
|
||||
//websocket数据交互
|
||||
type DataTransferReq {
|
||||
MsgType string `json:"msg_type"` //消息类型
|
||||
Message interface{} `json:"message"` //传递的消息
|
||||
}
|
||||
type DataTransferRsp {
|
||||
MsgType string `json:"msg_type"` //消息类型
|
||||
Message interface{} `json:"message"` //传递的消息
|
||||
}
|
||||
Reference in New Issue
Block a user