Documentation
¶
Index ¶
- Variables
- type AccountProvider
- type AnnouncementColor
- type AnnouncementMessage
- type AnonGiftPaidUpgradeMessage
- type Badge
- type Chat
- type ClearChat
- type ClearMessage
- type Emote
- type EmotePosition
- type GiftPaidUpgradeMessage
- type IRCer
- type JoinMessage
- type MsgID
- type Notice
- type PartMessage
- type PingMessage
- type PongMessage
- type PrivateMessage
- type RaidMessage
- type RetryReachedError
- type RitualMessage
- type RoomState
- type SubGiftMessage
- type SubMessage
- type SubPlan
- type UserNotice
- type UserState
- type UserType
- type Whisper
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrZeroLengthMessage is returned when parsing if the input is // zero-length. ErrZeroLengthMessage = errors.New("irc: cannot parse zero-length message") // ErrMissingDataAfterPrefix is returned when parsing if there is // no message data after the prefix. ErrMissingDataAfterPrefix = errors.New("irc: no message data after prefix") // ErrMissingDataAfterTags is returned when parsing if there is no // message data after the tags. ErrMissingDataAfterTags = errors.New("irc: no message data after tags") // ErrMissingCommand is returned when parsing if there is no // command in the parsed message. ErrMissingCommand = errors.New("irc: missing message command") ErrUnhandledCommand = errors.New("irc: message command not handled by parser") )
Functions ¶
This section is empty.
Types ¶
type AccountProvider ¶
type AnnouncementColor ¶
type AnnouncementColor string
const ( Primary AnnouncementColor = "PRIMARY" Blue AnnouncementColor = "BLUE" Green AnnouncementColor = "GREEN" Orange AnnouncementColor = "ORANGE" Purple AnnouncementColor = "PURPLE" )
func (AnnouncementColor) RGBHex ¶
func (a AnnouncementColor) RGBHex() string
func (AnnouncementColor) String ¶
func (a AnnouncementColor) String() string
type AnnouncementMessage ¶
type AnnouncementMessage struct {
UserNotice
ParamColor AnnouncementColor
Message string
}
type AnonGiftPaidUpgradeMessage ¶
type AnonGiftPaidUpgradeMessage struct {
UserNotice
PromoGiftTotal int
PromoName string
}
type Chat ¶
type Chat struct {
// contains filtered or unexported fields
}
type ClearChat ¶
type ClearMessage ¶
type ClearMessage struct {
Login string
RoomID string
ChannelUserName string
TargetMsgID string
TMISentTS time.Time
}
func (*ClearMessage) IRC ¶
func (c *ClearMessage) IRC() string
type Emote ¶
type Emote struct {
ID string
Positions []EmotePosition
}
type EmotePosition ¶
type GiftPaidUpgradeMessage ¶
type GiftPaidUpgradeMessage struct {
UserNotice
PromoGiftTotal int
PromoName string
SenderLogin string
SenderName string
}
type IRCer ¶
type IRCer interface {
IRC() string
}
IRCer are types that can be turned into an IRC command
type JoinMessage ¶
type JoinMessage struct {
Channel string
}
func (JoinMessage) IRC ¶
func (j JoinMessage) IRC() string
type MsgID ¶
type MsgID string
const ( // UserNotice Sub MsgID = "sub" ReSub MsgID = "resub" SubGift MsgID = "subgift" SubMysteryGift MsgID = "submysterygift" GiftPaidUpgrade MsgID = "giftpaidupgrade" RewardGift MsgID = "rewardgift" AnonGiftPaidUpgrade MsgID = "anongiftpaidupgrade" Raid MsgID = "raid" UnRaid MsgID = "unraid" Ritual MsgID = "ritual" BitsBadgeTier MsgID = "bitsbadgetier" Announcement MsgID = "announcement" )
type PartMessage ¶
type PartMessage struct {
Channel string
}
func (PartMessage) IRC ¶
func (p PartMessage) IRC() string
type PingMessage ¶
type PingMessage struct{}
func (PingMessage) IRC ¶
func (p PingMessage) IRC() string
type PongMessage ¶
type PongMessage struct{}
func (PongMessage) IRC ¶
func (p PongMessage) IRC() string
type PrivateMessage ¶
type PrivateMessage struct {
BadgeInfo []Badge
Badges []Badge
Bits int
Color string
DisplayName string
Emotes []Emote
ID string
Mod bool
FirstMsg bool
// Hype chat
PaidAmount int
PaidCurrency string
PaidExponent int
PaidLevel string
PaidIsSystemMessage bool
// Reply
ParentMsgID string
ParentUserID string
ParentUserLogin string
ParentDisplayName string
ParentMsgBody string
ThreadParentMsgID string
ThreadParentUserLogin string
RoomID string
ChannelUserName string
LoginName string
Subscriber bool
TMISentTS time.Time
Turbo bool
UserID string
UserType UserType
VIP bool
// Joined chat rooms
SourceID string
SourceRoomID string
SourceBadges []Badge
Message string
}
func (*PrivateMessage) Clone ¶
func (p *PrivateMessage) Clone() *PrivateMessage
func (*PrivateMessage) IRC ¶
func (p *PrivateMessage) IRC() string
func (PrivateMessage) MarshalEasyJSON ¶
func (v PrivateMessage) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (*PrivateMessage) UnmarshalEasyJSON ¶
func (v *PrivateMessage) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
type RaidMessage ¶
type RaidMessage struct {
UserNotice
DisplayName string
Login string
ViewerCount int
}
type RetryReachedError ¶
type RetryReachedError struct {
// contains filtered or unexported fields
}
func (RetryReachedError) Error ¶
func (e RetryReachedError) Error() string
func (RetryReachedError) Unwrap ¶
func (e RetryReachedError) Unwrap() error
type RitualMessage ¶
type RitualMessage struct {
UserNotice
RitualName string
Message string
}
type RoomState ¶
type RoomState struct {
EmoteOnly *bool
FollowersOnly *int
R9K *bool
RoomID string
ChannelUserName string
Slow *int
SubsOnly *bool
}
Only the changed values are set RoomState does not represent the final state
type SubGiftMessage ¶
type SubMessage ¶
type UserNotice ¶
type UserNotice struct {
BadgeInfo []Badge
Badges []Badge
Color string
DisplayName string
Emotes []Emote
ID string
Login string
Mod bool
MsgID MsgID
RoomID string
ChannelUserName string
Subscriber bool
SystemMsg string
TMISentTS time.Time
Turbo bool
UserID string
UserType UserType
}
func (*UserNotice) IRC ¶
func (u *UserNotice) IRC() string
type UserState ¶
Click to show internal directories.
Click to hide internal directories.