Documentation
¶
Index ¶
- Constants
- type Capabilities
- type Channel
- type Client
- func (c *Client) AppendChannel(channel Channel) *Node[Channel]
- func (c *Client) Initialize(host string, port string, tlsEnabled bool)
- func (c *Client) Register(nick string, password string, channel string)
- func (c *Client) RemoveChannel(channel *Node[Channel])
- func (c *Client) SendCommand(cmd string, params ...string)
- type Features
- type Message
- type MessageTags
- type MsgFmtOpts
- type Node
- type User
Constants ¶
View Source
const CRLF = "\r\n"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Channel ¶
type Channel struct {
// Channel name
Name string
// Channel topic
Topic string
// Channel messages history
History string
// Date of the last message we received in this channel
LastUpdatedDate time.Time
// Users in this channel
// The map key is the user's nickname
// and the user struct holds data about that user
// such as, prefixes in this channel and etc...
Users map[string]User
}
type Client ¶
type Client struct {
// tcp connection
TCPConn net.Conn
// Host that client is connected to
Host string
// Port that client is connected to
Port string
// Nickname currently in use by the user
Nickname string
// The root of the doubly linked list of channel
RootChannel *Node[Channel]
// Active channel
ActiveChannel *Node[Channel]
// The channel to join immediately after registration completes.
InitialChannel string
// Reference to the bubbletea program
Tea *tea.Program
// The acknowledged capabilities
EnabledCapabilities Capabilities
// The features currently enabled for this client
EnabledFeatures Features
}
func (*Client) RemoveChannel ¶
func (*Client) SendCommand ¶
type Message ¶
type Message struct {
DateTime time.Time
Tags MessageTags // starts with @ | Optional
Source string // starts with : | Optional
Command string // can either be a string or a numeric value | Required
Parameters []string // Optional (Dependant on command)
}
func (*Message) SetTimestamp ¶
func (m *Message) SetTimestamp()
type MessageTags ¶
type MsgFmtOpts ¶
Click to show internal directories.
Click to hide internal directories.