Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCommandNotFound = errors.New("command not found")
Functions ¶
This section is empty.
Types ¶
type SlashCommand ¶
type SlashCommand struct {
// Command is the root command that will be used to dispatch the received slash command
Command string
// Token is the token you get from Mattermost when creating a slash command
Token string
// DialogURL is the URL that will be used to open the dialog
DialogURL string
// DialogResponseURL is the URL that will be used to send the response to the dialog
DialogResponseURL string
// ScheduledResponseURL is the URL that will be used to send the response from the scheduled commands
SchedulerResponseURL string
Commands []model.Command
AccessControl model.AccessControl
}
func Load ¶
func Load(ctx context.Context, plugins []plugin.Plugin, cfg []config.CommandConfig) ([]SlashCommand, error)
func (*SlashCommand) Execute ¶
func (s *SlashCommand) Execute(ctx context.Context, mmCommand *model.MMSlashCommand, cmd string, args map[string]string) (*model.CommandResponse, error)
func (*SlashCommand) ExecuteDialog ¶
func (s *SlashCommand) ExecuteDialog(ctx context.Context, submission *model.DialogSubmission, cmd string, args map[string]string) (*model.CommandResponse, error)
Click to show internal directories.
Click to hide internal directories.