Documentation ¶
Index ¶
- Constants
- func ParseTags(msg string) (map[string]string, int, error)
- type Client
- func (c *Client) Connect(ctx context.Context) error
- func (c *Client) IsConnected() bool
- func (c *Client) SetOAuth(oauth string)
- func (c *Client) SetOnConnect(f func())
- func (c *Client) SetOnMessage(f func(Message))
- func (c *Client) SetOnReconnect(f func())
- func (c *Client) Shutdown()
- func (c *Client) Write(msg string) error
- type IrcTags
- type Message
- type MessageType
Constants ¶
View Source
const ( MessageTypePrivmsg = "PRIVMSG" MessageTypeNotice = "NOTICE" MessageTypePing = "PING" MessageTypePong = "PONG" MessageTypeCap = "CAP" MessageType001 = "001" MessageType002 = "002" MessageType003 = "003" MessageType004 = "004" MessageType353 = "353" MessageType366 = "366" MessageType372 = "372" MessageType375 = "375" MessageType376 = "376" MessageTypeUnknown = "UNKNOWN" MessageTypeJoin = "JOIN" MessageTypePart = "PART" MessageTypeGlobalUserState = "GLOBALUSERSTATE" MessageTypeWhisper = "WHISPER" MessageTypeRoomState = "ROOMSTATE" MessageTypeUserState = "USERSTATE" MessageTypeClearChat = "CLEARCHAT" MessageTypeReconnect = "RECONNECT" MessageTypeUserNotice = "USERNOTICE" MsgIdChannelSuspended = "msg_channel_suspended" MsgIdBanned = "msg_banned" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) IsConnected ¶
func (*Client) SetOnConnect ¶
func (c *Client) SetOnConnect(f func())
func (*Client) SetOnMessage ¶
func (*Client) SetOnReconnect ¶
func (c *Client) SetOnReconnect(f func())
type IrcTags ¶
func (IrcTags) ChannelSuspended ¶
type Message ¶
type Message struct { Raw string Source string Type MessageType Channel string User string Content string Tags IrcTags }
func ParseMessage ¶
type MessageType ¶
type MessageType string
func ToMessageType ¶
func ToMessageType(s string) MessageType
Click to show internal directories.
Click to hide internal directories.