websocket 通信数据格式

#### Request ``` type wsRequest struct { Request bool `json:"request"` ID int64 `json:"id"` Method string `json:"method" binding:"required"` RoomID string `json:"roomId" binding:"required"` FromID string `json:"fromId" binding:"required"` ToID string `json:"toId"` Data json.RawMessage `json:"data"` } ``` #### Response ``` type wsResponse struct { Response bool `json:"response"` OK bool `json:"ok"` ID int64 `json:"id"` ErrorCode int `json:"errorCode"` ErrorReason string `json:"errorReason"` Method string `json:"method"` RoomID string `json:"roomId"` FromID string `json:"fromId"` ToID string `json:"toId"` Data interface{} `json:"data"` } ``` #### Notification ``` type wsNotice struct { Notification bool `json:"notification"` Method string `json:"method"` RoomID string `json:"roomId"` FromID string `json:"fromId"` ToID string `json:"toId"` Data interface{} `json:"data"` } ```