Documentation ¶
Index ¶
- Variables
- type Account
- type AccountsStruct
- type BotAPI
- type ConfigStruct
- func (self *ConfigStruct) GetConfig() map[string]string
- func (self *ConfigStruct) GetCoroutines() map[string]func(cfg *ConfigStruct)
- func (self *ConfigStruct) GetHandlers() map[string]func(*BotAPI, interface{}, string)
- func (self *ConfigStruct) GetHelp() map[string]string
- func (self *ConfigStruct) GetPostParsers() map[string]func(cfg *ConfigStruct)
- func (self *ConfigStruct) GetPreParsers() map[string]func(cfg *ConfigStruct)
- func (self *ConfigStruct) GetTextMessageHandlers() map[string]func(*BotAPI, interface{}, string)
- func (self *ConfigStruct) RegisterCoroutine(name string, f func(cfg *ConfigStruct))
- func (self *ConfigStruct) RegisterHandler(name string, f func(*BotAPI, interface{}, string))
- func (self *ConfigStruct) RegisterHelp(name, help_str string)
- func (self *ConfigStruct) RegisterHelpAndHandler(name, help_str string, handler func(*BotAPI, interface{}, string))
- func (self *ConfigStruct) RegisterParser(name string, preparser func(cfg *ConfigStruct), ...)
- func (self *ConfigStruct) RegisterPostParser(name string, f func(cfg *ConfigStruct))
- func (self *ConfigStruct) RegisterPreParser(name string, f func(cfg *ConfigStruct))
- func (self *ConfigStruct) RegisterTextMessageHandler(name string, f func(*BotAPI, interface{}, string))
- func (self *ConfigStruct) SetConfig(key, val string)
- type MessageHistoryItem
- type RichMessage
- type UserProfile
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Accounts *AccountsStruct Config *ConfigStruct )
Functions ¶
This section is empty.
Types ¶
type AccountsStruct ¶
type AccountsStruct struct {
// contains filtered or unexported fields
}
func (*AccountsStruct) AppendAccounts ¶
func (self *AccountsStruct) AppendAccounts(account *Account)
func (*AccountsStruct) GetAccountByAPIKey ¶
func (self *AccountsStruct) GetAccountByAPIKey(apiKey string) (account *Account)
func (*AccountsStruct) GetAccounts ¶
func (self *AccountsStruct) GetAccounts() (accounts []*Account)
type BotAPI ¶
type BotAPI struct { API interface{} ProtocolAPI interface{} Bot struct { Build struct { Build string BuildDate string GoVersion string Version string ProjectURL string } GetCachedItem func(string) string SetCachedItems func(string, map[int]string) string GetCommandHandlers func() map[string]func(*BotAPI, interface{}, string) GetHelp func() map[string]string Stats struct { StartTimestamp int64 ProcessedMessages int64 ProcessedMessagesTotal int64 ConnectedAccounts int32 TotalAccounts int32 } PostMessage func(interface{}, string, *BotAPI, ...interface{}) } CommandPrefix string UserProfile *UserProfile }
type ConfigStruct ¶
type ConfigStruct struct {
// contains filtered or unexported fields
}
func (*ConfigStruct) GetConfig ¶
func (self *ConfigStruct) GetConfig() map[string]string
func (*ConfigStruct) GetCoroutines ¶
func (self *ConfigStruct) GetCoroutines() map[string]func(cfg *ConfigStruct)
func (*ConfigStruct) GetHandlers ¶
func (self *ConfigStruct) GetHandlers() map[string]func(*BotAPI, interface{}, string)
func (*ConfigStruct) GetHelp ¶
func (self *ConfigStruct) GetHelp() map[string]string
func (*ConfigStruct) GetPostParsers ¶
func (self *ConfigStruct) GetPostParsers() map[string]func(cfg *ConfigStruct)
func (*ConfigStruct) GetPreParsers ¶
func (self *ConfigStruct) GetPreParsers() map[string]func(cfg *ConfigStruct)
func (*ConfigStruct) GetTextMessageHandlers ¶
func (self *ConfigStruct) GetTextMessageHandlers() map[string]func(*BotAPI, interface{}, string)
func (*ConfigStruct) RegisterCoroutine ¶
func (self *ConfigStruct) RegisterCoroutine(name string, f func(cfg *ConfigStruct))
func (*ConfigStruct) RegisterHandler ¶
func (self *ConfigStruct) RegisterHandler(name string, f func(*BotAPI, interface{}, string))
func (*ConfigStruct) RegisterHelp ¶
func (self *ConfigStruct) RegisterHelp(name, help_str string)
func (*ConfigStruct) RegisterHelpAndHandler ¶
func (self *ConfigStruct) RegisterHelpAndHandler(name, help_str string, handler func(*BotAPI, interface{}, string))
func (*ConfigStruct) RegisterParser ¶
func (self *ConfigStruct) RegisterParser(name string, preparser func(cfg *ConfigStruct), postparser func(cfg *ConfigStruct))
func (*ConfigStruct) RegisterPostParser ¶
func (self *ConfigStruct) RegisterPostParser(name string, f func(cfg *ConfigStruct))
func (*ConfigStruct) RegisterPreParser ¶
func (self *ConfigStruct) RegisterPreParser(name string, f func(cfg *ConfigStruct))
func (*ConfigStruct) RegisterTextMessageHandler ¶
func (self *ConfigStruct) RegisterTextMessageHandler(name string, f func(*BotAPI, interface{}, string))
func (*ConfigStruct) SetConfig ¶
func (self *ConfigStruct) SetConfig(key, val string)
type MessageHistoryItem ¶
type RichMessage ¶
type RichMessage struct { BarColor string Text string Title string TitleLink string ImageURL string }
func (*RichMessage) IsEmpty ¶
func (rm *RichMessage) IsEmpty() bool
func (*RichMessage) ToGenericAttachment ¶
func (rm *RichMessage) ToGenericAttachment() (msg, url string)
Click to show internal directories.
Click to hide internal directories.