Versions in this module Expand all Collapse all v1 v1.0.0 Apr 28, 2021 Changes in this version + var ErrMalformedTopic = fmt.Errorf("malformed topic") + var ErrNoConnection = fmt.Errorf("no connection") + var ErrNoMessageDecoder = fmt.Errorf("no decoder for message") + var ErrNoNonce = fmt.Errorf("command responded with unknown nonce") + func DebugMessage(topic string, message interface{}, raw io.Reader, err error) + func DiscardMessage(topic string, message interface{}, raw io.Reader, err error) + func RegisterMessageDecoder(topic string, d MessageDecoderFunc) + func Topic(topic string) (string, error) + func UnregisterMessageDecoder(topic string) + type Client struct + OnConnect OnConnectFunc + OnDisconnect OnDisconnectFunc + OnMessage OnMessageFunc + OnUnknownMessage OnUnknownMessageFunc + WebsocketURL string + func NewClient() (*Client, error) + func (c *Client) Connect(ctx context.Context) + func (c *Client) Listen(authToken string, topics ...string) error + func (c *Client) Unlisten(topics ...string) error + type MessageDecoderFunc = func(body []byte) (interface{}, error) + type OnConnectFunc func() + type OnDisconnectFunc func() + type OnMessageFunc func(topic string, message interface{}, raw io.Reader, err error) + type OnUnknownMessageFunc func(body []byte) + type TwitchError struct + ErrorCode string + func (m *TwitchError) Error() string