package proto type ImKeyReq struct { To_user_id int `json:"to_user_id" form:"to_user_id" binding:"required"` } // 定义WebSocket消息格式 type Message struct { Type string `json:"type"` Msg string `json:"data"` To_user_id int `json:"to_user_id"` From_user_id int `json:"from_user_id"` Session string `json:"session"` }