Versions in this module Expand all Collapse all v1 v1.6.0 Apr 11, 2020 v1.5.0 Apr 23, 2019 Changes in this version + var DefaultFactory = MapFactory + func Serialize(p *Packet) ([]byte, error) + func Write(w io.Writer, p *Packet) error + type FactoryFunc func() interface + type MapFactory map[string]FactoryFunc + func (f MapFactory) NewPayload(cmd string) interface{} type Packet + func Deserialize(b []byte) (*Packet, error) + func DeserializeWithFactory(b []byte, f PayloadFactory) (*Packet, error) + func Read(r io.Reader) (*Packet, error) + func ReadWithFactory(r io.Reader, f PayloadFactory) (*Packet, error) + type PayloadFactory interface + NewPayload func(cmd string) interface{} v1.4.0 Mar 25, 2019 v1.3.0 Mar 17, 2019 Changes in this version + const UserAttrProgramID + const UserAttrRank + const UserAttrRate + const UserAttrWins + type UserAttribute struct + Key string + Value string v1.2.1 Jan 6, 2019 v1.2.0 Dec 21, 2018 Changes in this version + const CmdAuthenticate + const CmdBanUser + const CmdConnect + const CmdConnectEvent + const CmdDisconnect + const CmdDisconnectEvent + const CmdKickUser + const CmdMessageEvent + const CmdRequestSuffix + const CmdResponseSuffix + const CmdSendEmote + const CmdSendMessage + const CmdSendWhisper + const CmdSetModerator + const CmdUnbanUser + const CmdUserLeaveEvent + const CmdUserUpdateEvent + const Endpoint + var ErrBadRequest = Status + var ErrNotConnected = Status + var ErrRateLimit = Status + var ErrRequestTimeout = Status + var Success = Status + func SerializePacket(w io.Writer, p *Packet) error + type Authenticate struct + APIKey string + type BanUser struct + UserID int64 + type Connect struct + type ConnectEvent struct + Channel string + type Disconnect struct + type DisconnectEvent struct + type KickUser struct + UserID int64 + type MessageEvent struct + Message string + Type MessageEventType + UserID int64 + type MessageEventType uint32 + const MessageChannel + const MessageEmote + const MessageServerError + const MessageServerInfo + const MessageWhisper + const Unknown + func (m *MessageEventType) UnmarshalText(txt []byte) error + func (m MessageEventType) MarshalText() ([]byte, error) + func (m MessageEventType) String() string + type Packet struct + Command string + Payload interface{} + RequestID int64 + Status *Status + func DeserializePacket(r io.Reader) (*Packet, error) + type Response struct + type SendEmote struct + Message string + type SendMessage struct + Message string + type SendWhisper struct + Message string + UserID int64 + type SetModerator struct + UserID int64 + type Status struct + Area int + Code int + func (s *Status) Error() string + func (s *Status) Timeout() bool + type UnbanUser struct + Username string + type UserAttributes struct + ProgramID string + Rank string + Rate string + Wins string + type UserFlags uint32 + const UserFlagAdmin + const UserFlagModerator + const UserFlagMuteGlobal + const UserFlagMuteWhisper + const UserFlagSpeaker + func (f *UserFlags) UnmarshalJSON(b []byte) error + func (f UserFlags) MarshalJSON() ([]byte, error) + func (f UserFlags) String() string + type UserLeaveEvent struct + UserID int64 + type UserUpdateEvent struct + Attributes UserAttributes + Flags UserFlags + UserID int64 + Username string