1 Star 1 Fork 0

linngc / center.gf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
websocket_model.go 1016 Bytes
一键复制 编辑 原始数据 按行查看 历史
// Package websocket
// @Link https://gitee.com/linngc/center.gf
// @Copyright Copyright (c) 2022 center CLI
// @Author linngc
// @License
package websocket
import (
"github.com/gogf/gf/v2/frame/g"
)
// WRequest 当前输入对象
type WRequest struct {
Event string `json:"event"` //事件名称
FromId interface{} `json:"fromId"` //发送人id
ToId interface{} `json:"toId"` //接收人id
Data g.Map `json:"data"` //数据
}
// WResponse 输出对象
type WResponse struct {
Event string `json:"event"` //事件名称
FromId interface{} `json:"fromId"` //发送人id
ToId interface{} `json:"toId"` //接收人id
Data interface{} `json:"data"` //数据
}
type TagWResponse struct {
Tag string //标签名称
WResponse *WResponse //输出对象
}
type UWResponse struct {
Unique uint64 //用户id
WResponse *WResponse //输出对象
}
type ClientWResponse struct {
ID string //客户端id
WResponse *WResponse //输出对象
}
Go
1
https://gitee.com/linngc/center.gf.git
git@gitee.com:linngc/center.gf.git
linngc
center.gf
center.gf
52e4a05782b6

搜索帮助

53164aa7 5694891 3bd8fe86 5694891