Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶ added in v1.6.3
InitLogger provides logger instance for the given config
Types ¶
type BaseCommand ¶ added in v1.6.3
type BaseCommand struct {
client.SlackClient
}
base struct which is handy for all commands, as a direct Slack communication is possible
type Bot ¶ added in v1.6.0
type Bot struct {
// contains filtered or unexported fields
}
func NewBot ¶
NewBot created main Bot struct which holds the slack connection and dispatch messages to commands
func (*Bot) DisconnectRTM ¶ added in v1.6.0
DisconnectRTM will do a clean shutdown and kills all connections
func (*Bot) HandleMessages ¶ added in v1.6.0
func (b *Bot) HandleMessages(ctx *util.ServerContext)
HandleMessages is blocking method to handle new incoming events
type Category ¶ added in v1.6.3
Category of Help entries. -> Groups command in help command by "Jenkins", "Pull request" etc
type Command ¶
Command is the main command struct which needs to provide the matcher and the actual executed action
type Commands ¶
type Commands struct {
// contains filtered or unexported fields
}
Commands is a wrapper of a list of commands. Only the first matched command will be executed
func (*Commands) AddCommand ¶
AddCommand registers a command to the command list
type Conditional ¶
type Conditional interface {
IsEnabled() bool
}
Conditional checks if the command should be activated. E.g. is dependencies are not present or it's disabled in the config
type Help ¶
type Help struct { Command string Description string HelpURL string Category Category Examples []string }
Help command can provide help objects which are searchable by keywords
func (*Help) GetKeywords ¶
GetKeywords crates a string slice of help keywords -> used by fuzzy search
type HelpProvider ¶
type HelpProvider interface { // each command should provide information, like a description or examples GetHelp() []Help }
HelpProvider can be provided by a command to add information within "help" command