Documentation
¶
Index ¶
- Variables
- func Alias(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ...)
- func Custom(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ...)
- func New(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ...)
- func Nothing(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ...)
- func Short(s string, i int) string
- func SongRequestAdd(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ...)
- func SubdayEnd(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ...)
- func SubdayNew(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ...)
- func Vote(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ...)
- type CommandHandler
- type RouterStruct
Constants ¶
This section is empty.
Variables ¶
View Source
var Router = RouterStruct{ // contains filtered or unexported fields }
Router explicitly maps input chat command to a handler
Functions ¶
func Alias ¶
func Alias(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)
Alias creates alias of existing command by copying its content and setting that it is alias to a parent command
func Custom ¶
func Custom(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)
Custom handler checks if input command has template and then fills it in with mustache templating and sends to a specified/user
func New ¶
func New(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)
New creates or modifies mustache templates for channel
func Nothing ¶
func Nothing(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)
Nothing does nothing, it is stub
func SongRequestAdd ¶
func SongRequestAdd(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)
func SubdayEnd ¶
func SubdayEnd(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)
func SubdayNew ¶
func SubdayNew(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)
func Vote ¶
func Vote(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)
Types ¶
type CommandHandler ¶
type CommandHandler func(online bool, chatMessage *models.ChatMessage, chatCommand models.ChatCommand, ircClient *ircClient.IrcClient)
CommandHandler is interface for functions that will handle stuff
type RouterStruct ¶
type RouterStruct struct {
// contains filtered or unexported fields
}
RouterStruct is struct for handling command to handler
func (RouterStruct) Go ¶
func (router RouterStruct) Go(command string) CommandHandler
Go returns from router to work with
Click to show internal directories.
Click to hide internal directories.