This commit is contained in:
laodaming
2023-07-24 16:07:05 +08:00
parent 7ec78d1c35
commit 7e22f47a0d
11 changed files with 350 additions and 0 deletions

25
server_api/websocket.api Normal file
View 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"` //传递的消息
}