Documentation
¶
Index ¶
- type Bot
- type Conn
- type IrcMessage
- type Manager
- type Message
- type MockBot
- func (m *MockBot) Close()
- func (m *MockBot) Dial(addr, nick, user string) error
- func (m *MockBot) Join(target string)
- func (m *MockBot) Manager() Manager
- func (m *MockBot) Part(target string)
- func (m *MockBot) Privmsg(target, msg string)
- func (m *MockBot) Quit()
- func (m *MockBot) Ready() <-chan struct{}
- func (m *MockBot) Send(f string, a ...interface{})
- func (m *MockBot) Wait() <-chan struct{}
- type MockConn
- type Script
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot interface { Dial(addr, nick, user string) error Close() Send(f string, a ...interface{}) Privmsg(target, msg string) Join(target string) Part(target string) Quit() Wait() <-chan struct{} Ready() <-chan struct{} Manager() Manager }
Bot is an abstract contract for an IRC Bot
type Conn ¶
type Conn interface { Dial(addr string) error Close() WriteLine(raw string) ReadLine() (string, error) }
Conn is an abstract interface for an IRC connection
type IrcMessage ¶
IrcMessage is a representation of a raw IRC message
type Manager ¶
type Manager interface { Respond(msg Message) Listen(msg IrcMessage) LoadScripts(dir string) LoadFile(path string) error Reload(script string) error ReloadBase() error Unload(name string) error UnloadAll() Scripts() map[string]Script }
Manager represents a set of managed scripts
type MockBot ¶
type MockBot struct { DialFn func(string, string, string) error CloseFn func() SendFn func(string, ...interface{}) PrivmsgFn func(string, string) JoinFn func(string) PartFn func(string) QuitFn func() WaitFn func() <-chan struct{} ReadyFn func() <-chan struct{} ManagerFn func() Manager }
MockBot is a type that implements noye.Bot which can have parts of it overridden by changing the functors
func NewMockBot ¶
func NewMockBot() *MockBot
NewMockBot returns a new MockBot with the fns set to no-ops
type MockConn ¶
type MockConn struct { DialFn func(string) error CloseFn func() WriteLineFn func(string) ReadLineFn func() (string, error) }
MockConn is a type that implements noye.Conn which can have parts of it overridden by changing the functors
func NewMockConn ¶
func NewMockConn() *MockConn
NewMockConn returns a new MockConn with the fns set to no-ops
Click to show internal directories.
Click to hide internal directories.