first
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package model
|
||||
|
||||
type Message struct {
|
||||
Type string `json:"type"`
|
||||
Seq int `json:"seq,omitempty"`
|
||||
Timestamp int64 `json:"timestamp,omitempty"`
|
||||
Payload map[string]interface{} `json:"payload,omitempty"`
|
||||
}
|
||||
|
||||
type PlayerInfo struct {
|
||||
PlayerID string `json:"player_id"`
|
||||
Nickname string `json:"nickname"`
|
||||
IsReady bool `json:"is_ready"`
|
||||
IsHost bool `json:"is_host"`
|
||||
}
|
||||
|
||||
type RoomState struct {
|
||||
RoomID string `json:"room_id"`
|
||||
State string `json:"state"`
|
||||
HarmonyTarget int `json:"harmony_target"`
|
||||
Players []PlayerInfo `json:"players"`
|
||||
YourPlayerID string `json:"your_player_id"`
|
||||
}
|
||||
Reference in New Issue
Block a user