实现聊天光标闪烁,实现聊天会话上下文

This commit is contained in:
RockYang
2023-03-19 00:31:35 +08:00
parent 59782e9e57
commit e2c3f50c8a
8 changed files with 146 additions and 92 deletions

View File

@@ -10,11 +10,18 @@ type BizVo struct {
Data interface{} `json:"data,omitempty"`
}
// WsVo Websocket 信息 VO
type WsVo struct {
Stop bool
Content string
// WsMessage Websocket message
type WsMessage struct {
Type WsMsgType `json:"type"` // 消息类别start, end
Content string `json:"content"`
}
type WsMsgType string
const (
WsStart = WsMsgType("start")
WsMiddle = WsMsgType("middle")
WsEnd = WsMsgType("end")
)
type BizCode int