Documentation
¶
Index ¶
Constants ¶
View Source
const ( DISCONNECTED = "DISCONNECTED" JOIN = "JOIN" PART = "PART" PRIVMSG = "PRIVMSG" QUIT = "QUIT" )
These constant values must be used for the Command member of the Message struct.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gateway ¶
type Gateway interface {
api.Peripheral
api.Receptor
// Quit must disconnect the Gateway from the IRC server. This must be a blocking method. When the method returns,
// the instance must not be connected to the IRC server anymore.
Quit() error
// Join method must send a JOIN command to the IRC server. The argument specifies the channel to be joined. If the
// instance is not connected to any IRC server, then an error is returned.
Join(channel string) error
// Privmsg must send a PRIVMSG command to the IRC server. The first argument specifies the destination (i.e. either
// a user or a channel) and the second argument is the actual message. If the instance is not connected to any IRC
// server, then an error is returned.
Privmsg(destination string, message string) error
}
Gateway is the interface which for an IRC peripheral and receptor. The reference implementation at https://github.com/emersyx/emersyx_irc follows this interface.
type Message ¶
Message is the basic structure for an IRC message received by the client when an event occurs. Names of the struct members have been taken from RFC-1459 and RFC-2812. This is the structure which implements the Event interface for IRC events.
Source Files
¶
- gateway.go
- message.go
Click to show internal directories.
Click to hide internal directories.