fusenapi/server_api/websocket.api

25 lines
581 B
Plaintext
Raw Normal View History

2023-07-24 08:07:05 +00:00
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"` //传递的消息
}