Documentation ¶
Index ¶
Constants ¶
View Source
const ( FormatInvalid = "invalid" FormatJSON = "json" FormatYAML = "yaml" )
Variables ¶
View Source
var ( ErrEmailNotificationsAreDisabled = errors.New("email notifications are disabled") ErrWebhookNotificationsAreDisabled = errors.New("webhook notifications are disabled") )
Functions ¶
This section is empty.
Types ¶
type API ¶
API implements the configs api.
func (*API) RegisterRoutes ¶
RegisterRoutes registers the configs API HTTP routes with the provided Router.
type Config ¶
type Config struct {
Notifications NotificationsConfig `yaml:"notifications"`
}
Config configures Configs API
func (*Config) RegisterFlags ¶
RegisterFlags adds the flags required to configure this to the given FlagSet.
type ConfigsView ¶
type ConfigsView struct {
Configs map[string]userconfig.View `json:"configs"`
}
ConfigsView renders multiple configurations, mapping userID to userconfig.View. Exposed only for tests.
type NotificationsConfig ¶
type NotificationsConfig struct { DisableEmail bool `yaml:"disable_email"` DisableWebHook bool `yaml:"disable_webhook"` }
NotificationsConfig configures Alertmanager notifications method.
Click to show internal directories.
Click to hide internal directories.