Documentation ¶
Index ¶
- Variables
- type Bucket
- type ClearChat
- type ClearMsg
- type Emitter
- type Event
- type GlobalUserState
- type HostTarget
- type Irc
- func (irc *Irc) CapReq(req string) error
- func (irc *Irc) Connect(user string, pass string, tags bool, outChan chan<- IrcMessage) error
- func (irc *Irc) Disconnect() error
- func (irc *Irc) Join(channel string) error
- func (irc *Irc) Part(channel string) error
- func (irc *Irc) Pong(server string) error
- func (irc *Irc) Privmsg(channel, msg string) error
- type IrcMessage
- type Join
- type MessageCommand
- type Notice
- type Options
- type Part
- type Ping
- type PrivMsg
- type RawIrcMessage
- type Reconnect
- type RoomState
- type TwitchChat
- func (tc *TwitchChat) Chat(channel, msg string) error
- func (tc *TwitchChat) Connect() error
- func (tc *TwitchChat) Disconnect() error
- func (tc *TwitchChat) Join(channel string) error
- func (tc *TwitchChat) Part(channel string) error
- func (tc *TwitchChat) Pong(ping *Ping)
- func (tc *TwitchChat) RegisterCallback(cb interface{}) error
- type UserNotice
- type UserState
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBucketClosed = fmt.Errorf("Error: Sink Closed")
View Source
var MessageCommandLookup = map[string]MessageCommand{ "CLEARCHAT": CLEARCHAT, "CLEARMSG": CLEARMSG, "GLOBALUSERSTATE": GLOBALUSERSTATE, "HOSTTARGET": HOSTTARGET, "JOIN": JOIN, "NOTICE": NOTICE, "PART": PART, "PING": PING, "PRIVMSG": PRIVMSG, "RECONNECT": RECONNECT, "ROOMSTATE": ROOMSTATE, "USERNOTICE": USERNOTICE, "USERSTATE": USERSTATE, }
Functions ¶
This section is empty.
Types ¶
type Bucket ¶
type Bucket struct {
// contains filtered or unexported fields
}
Bucket controls the flow of events into the sink
func NewBucket ¶
Makes a new bucket that can be filled with events. Events are dripped at the passed in rate with given burstLimit. To have no rate limit, rate.Inf should be passed in
type ClearChat ¶
type ClearChat struct { RawIrcMessage BanDuration uint Channel string User string }
type ClearMsg ¶
type ClearMsg struct { RawIrcMessage Channel string Login string Message string TargetMsgId string }
type GlobalUserState ¶
type HostTarget ¶
type HostTarget struct { RawIrcMessage Channel string NumberOfViewers uint TargetChannel string }
type Irc ¶
type Irc struct { OutChan chan<- IrcMessage // contains filtered or unexported fields }
func (*Irc) Disconnect ¶
type Join ¶
type Join struct { RawIrcMessage Channel string }
type MessageCommand ¶
type MessageCommand int
const ( UNKNOWN MessageCommand = iota CLEARCHAT CLEARMSG GLOBALUSERSTATE HOSTTARGET JOIN NOTICE PART PING PRIVMSG RECONNECT ROOMSTATE USERNOTICE USERSTATE )
type Part ¶
type Part struct { RawIrcMessage Channel string }
type Ping ¶
type Ping struct { RawIrcMessage Servers []string }
type RawIrcMessage ¶
type RawIrcMessage struct { RawMessage []byte RawTags map[string]string RawCommand MessageCommand RawParams [][]byte // contains filtered or unexported fields }
type Reconnect ¶
type Reconnect struct {
RawIrcMessage
}
type TwitchChat ¶
type TwitchChat struct {
// contains filtered or unexported fields
}
func NewTwitchChat ¶
func NewTwitchChat(options *Options) (*TwitchChat, error)
func (*TwitchChat) Chat ¶
func (tc *TwitchChat) Chat(channel, msg string) error
func (*TwitchChat) Connect ¶
func (tc *TwitchChat) Connect() error
func (*TwitchChat) Disconnect ¶
func (tc *TwitchChat) Disconnect() error
func (*TwitchChat) Join ¶
func (tc *TwitchChat) Join(channel string) error
func (*TwitchChat) Part ¶
func (tc *TwitchChat) Part(channel string) error
func (*TwitchChat) Pong ¶
func (tc *TwitchChat) Pong(ping *Ping)
func (*TwitchChat) RegisterCallback ¶
func (tc *TwitchChat) RegisterCallback(cb interface{}) error
type UserNotice ¶
type UserNotice struct { RawIrcMessage BadgeInfo string Badges string Channel string Color string DisplayName string Emotes string Id string Login string Message string Mod string MsgId string RoomId string Subscriber bool SystemMsg string TmiSentTs string Turbo string UserId string UserType string }
Click to show internal directories.
Click to hide internal directories.