Documentation
¶
Index ¶
- Variables
- func PrintCommands(con *irc.Connection, channel string, commands []string)
- func Recall(key string) (string, error)
- func RecallHash(hash string, key string) (string, error)
- func RecallHashAll(hash string) ([]string, error)
- func Remember(key string, value interface{}) error
- func RememberHash(hash string, key string, value interface{}) error
- func SetDefaultBrain(desired Brain)
- type Brain
- type Extender
- type Extensions
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RedisBrain = newRedisBrain() DefaultBrain = RedisBrain )
Functions ¶
func PrintCommands ¶
func RecallHashAll ¶
func RememberHash ¶
func SetDefaultBrain ¶
func SetDefaultBrain(desired Brain)
Types ¶
type Brain ¶
type Brain interface {
// contains filtered or unexported methods
}
A Brain is capapble of providing persistent storage for a gopherbot
type Extender ¶
type Extender interface { Commands() []string Process(con *irc.Connection, channel string, user string, args []string) }
An Extender can be used in gopherbot to provide additional functionality to the core
type Extensions ¶
type Extensions struct {
// contains filtered or unexported fields
}
Extensions contains information for extension handling in gopherbot
func NewExtensions ¶
func NewExtensions(con *irc.Connection) *Extensions
NewExtensions creates a new extensions processer that will use the given con to communicate with the IRC room.
func (*Extensions) Register ¶
func (ex *Extensions) Register(command string, handler Extender)
Register adds the mapping of command -> handler to the registry
func (*Extensions) Select ¶
func (ex *Extensions) Select(e *irc.Event)
SelectExtender parses a PRIVMSG IRC event and determines if it is a request for gopherbot. If it is, it looks up the command and invokes the appropriate extender.
Click to show internal directories.
Click to hide internal directories.