fusenapi/constants/websocket.go

26 lines
956 B
Go
Raw Normal View History

2023-07-24 11:44:28 +00:00
package constants
2023-08-23 07:08:45 +00:00
type Websocket string
2023-07-24 11:44:28 +00:00
// websocket消息类型
const (
2023-07-25 04:06:19 +00:00
//鉴权失败
2023-08-23 07:08:45 +00:00
WEBSOCKET_UNAUTH Websocket = "WEBSOCKET_UNAUTH"
2023-08-23 08:57:18 +00:00
//获取ws连接标识错误
WEBSOCKET_GEN_UNIQUE_ID_ERR Websocket = "WEBSOCKET_GEN_UNIQUE_ID_ERR"
2023-07-24 11:44:28 +00:00
//ws连接成功
2023-08-23 07:08:45 +00:00
WEBSOCKET_CONNECT_SUCCESS Websocket = "WEBSOCKET_CONNECT_SUCCESS"
2023-08-11 02:49:29 +00:00
//请求恢复为上次连接的标识
2023-08-23 07:08:45 +00:00
WEBSOCKET_REQUEST_REUSE_LAST_CONNECT Websocket = "WEBSOCKET_REQUEST_REUSE_LAST_CONNECT"
2023-08-11 02:49:29 +00:00
//请求恢复为上次连接的标识错误
2023-08-23 07:08:45 +00:00
WEBSOCKET_REQUEST_RESUME_LAST_CONNECT_ERR Websocket = "WEBSOCKET_REQUEST_RESUME_LAST_CONNECT_ERR"
2023-07-24 11:44:28 +00:00
//图片渲染
2023-08-23 07:08:45 +00:00
WEBSOCKET_RENDER_IMAGE Websocket = "WEBSOCKET_RENDER_IMAGE"
2023-08-22 08:07:05 +00:00
//图片渲染失败消息
2023-08-23 07:08:45 +00:00
WEBSOCKET_RENDER_IMAGE_ERR Websocket = "WEBSOCKET_RENDER_IMAGE_ERR"
2023-08-22 08:07:05 +00:00
//传入数据格式错误
2023-08-23 07:08:45 +00:00
WEBSOCKET_ERR_DATA_FORMAT Websocket = "WEBSOCKET_ERR_DATA_FORMAT"
2023-08-24 07:45:23 +00:00
//通用回调通知
WEBSOCKET_COMMON_NOTIFY Websocket = "WEBSOCKET_COMMON_NOTIFY"
2023-07-24 11:44:28 +00:00
)