Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BroadcastMessageRes ¶
type BroadcastMessageRes struct { Cmd string `json:"cmd"` Data BroadcastMessageResData `json:"data"` }
type BroadcastMessageResData ¶
type JoinedUser ¶
type Room ¶
type Room struct { ID string `json:"room_id"` OwnerID string `json:"owner_id"` Name string `json:"name"` OneTimeJoinKeys []string `json:"one_time_join_keys"` ForeverJoinKey string `json:"forever_join_key"` Users map[string]*User `json:"users"` }
func (*Room) AddUser ¶
AddUser adds a userID to a room if it isn't already there. This allows the user to receive messages from the room.
func (*Room) BroadcastMessage ¶
func (*Room) GetUsers ¶
func (r *Room) GetUsers() []JoinedUser
Click to show internal directories.
Click to hide internal directories.