Documentation ¶
Index ¶
Constants ¶
View Source
const FullValidConfigForTesting = `` /* 257-byte string literal not displayed */
FullValidConfigForTesting is a string representation of a JSON object that contains all fields supported by the notifier Config. It can be used without secrets.
View Source
const FullValidSecretsForTesting = `{
"username": "test-secret-user",
"password": "test-secret-pass"
}`
FullValidSecretsForTesting is a string representation of JSON object that contains all fields that can be overridden from secrets
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { URL string HTTPMethod string MaxAlerts int // Authorization Header. AuthorizationScheme string AuthorizationCredentials string // HTTP Basic Authentication. User string Password string Title string Message string }
func NewConfig ¶
func NewConfig(jsonData json.RawMessage, decryptFn receivers.DecryptFunc) (Config, error)
type Notifier ¶
Notifier is responsible for sending alert notifications as webhooks.
func New ¶
func New(cfg Config, meta receivers.Metadata, template *templates.Template, sender receivers.WebhookSender, images images.Provider, logger logging.Logger, orgID int64) *Notifier
New is the constructor for the WebHook notifier.
func (*Notifier) SendResolved ¶
Click to show internal directories.
Click to hide internal directories.