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 ¶ added in v0.7.0
type Config struct {
Notifications NotificationsConfig `yaml:"notifications"`
}
Config configures Configs API
func (*Config) RegisterFlags ¶ added in v0.7.0
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 ¶ added in v0.7.0
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.