Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotContext ¶
type BotContext interface {
PluginManager() plugins.PluginManager
AddPlugin(key interface{}, val plugins.BotMessagePlugin)
WebSocketRTM()
Run(connectedFunc func(event plugins.BotEvent))
// plugins.MessageSender
SendMessage(message, channel string)
}
func NewBotContext ¶
func NewBotContext(token string) (BotContext, error)
type Context ¶
func NewBotContextNotSysstd ¶
func NewContext ¶
func (*Context) AddPlugin ¶
func (ctx *Context) AddPlugin(key interface{}, val plugins.BotMessagePlugin)
func (*Context) PluginManager ¶
func (b *Context) PluginManager() plugins.PluginManager
func (*Context) SendMessage ¶
type Repository ¶
type Repository interface {
Load(key string) (string, error)
LoadList(key string) ([]string, error)
Save(key string, value string) error
SaveList(key string, values []string) error
Close() error
}
Repository is slackbot common repository interface
func NewOnMemoryRepository ¶
func NewOnMemoryRepository() Repository
NewOnMemoryRepository create on memory repository
func NewRedisRepository ¶
func NewRedisRepository(addr, password string, db int64) Repository
NewRedisRepository create on redis repository
Click to show internal directories.
Click to hide internal directories.