🎨 swagger update

This commit is contained in:
landaiqing
2024-08-21 23:52:01 +08:00
parent 78346f6a12
commit e0f0c4c466
16 changed files with 318 additions and 142 deletions

View File

@@ -16,6 +16,11 @@ const (
var Handler = NewWebSocket()
// NewGWSServer 创建websocket服务
// @Summary 创建websocket服务
// @Description 创建websocket服务
// @Tags websocket
// @Router /api/ws/gws [get]
func (WebsocketAPI) NewGWSServer(c *gin.Context) {
upgrader := gws.NewUpgrader(Handler, &gws.ServerOption{

View File

@@ -20,7 +20,11 @@ var (
mux sync.Mutex
)
// NewSocketClient 建websocket长链接接口处理函数
// NewSocketClient 建websocket服务
// @Summary 创建websocket服务(gorilla)
// @Description 创建websocket服务
// @Tags websocket
// @Router /api/ws/socket [get]
func (WebsocketAPI) NewSocketClient(context *gin.Context) {
id := context.Query("client_id")
global.LOG.Println(id + "websocket链接")