Documentation ¶
Index ¶
Constants ¶
View Source
const MessageInteractionIdSeparator = ":"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
type InteractionHandler ¶
type InteractionHandler func(s *discordgo.Session, i *discordgo.InteractionCreate, logger logrus.FieldLogger)
type InteractionHandlers ¶
type InteractionHandlers map[InteractionName]InteractionHandler
type InteractionName ¶
type InteractionName string
const ( GetAlertsCommandName InteractionName = "get-alerts" ShowInhibitedAlertsCommandName InteractionName = "show-inhibited-alerts" InhibitAlertCommandName InteractionName = "inhibit-alert" UninhibitAlertCommandName InteractionName = "uninhibit-alert" CreateScrapeConfigCommandName InteractionName = "create-scrape-config" UpdateScrapeConfigCommandName InteractionName = "update-scrape-config" RemoveScrapeConfigCommandName InteractionName = "remove-scrape-config" )
func (InteractionName) String ¶
func (c InteractionName) String() string
type InteractionOption ¶
type InteractionOption string
const ( ChannelOption InteractionOption = "channel" UserOption InteractionOption = "user" AlertNameOption InteractionOption = "alertname" ScrapeConfigNameOption InteractionOption = "scrape-config-name" EndpointOption InteractionOption = "endpoint" UsernameOption InteractionOption = "username" PasswordOption InteractionOption = "password" IntervalOption InteractionOption = "interval" )
func (InteractionOption) String ¶
func (c InteractionOption) String() string
type MessageInteractionHandlers ¶
type MessageInteractionHandlers map[InteractionName]InteractionHandler
type MessageInteractionId ¶
type MessageInteractionId string
func NewMessageInteractionId ¶
func NewMessageInteractionId(name InteractionName, values ...string) MessageInteractionId
func (MessageInteractionId) Name ¶
func (id MessageInteractionId) Name() (InteractionName, bool)
func (MessageInteractionId) String ¶
func (id MessageInteractionId) String() string
func (MessageInteractionId) Values ¶
func (id MessageInteractionId) Values() ([]string, bool)
Click to show internal directories.
Click to hide internal directories.