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 ¶
type API struct {
http.Handler
// contains filtered or unexported fields
}
API implements the configs api.
func (*API) RegisterRoutes ¶
func (a *API) RegisterRoutes(r *mux.Router)
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
func (cfg *Config) RegisterFlags(f *flag.FlagSet)
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.