Documentation
¶
Index ¶
Constants ¶
View Source
const (
// DefaultMessageType - Victorops uses "CRITICAL" string to indicate "Alerting" state
DefaultMessageType = "CRITICAL"
)
View Source
const FullValidConfigForTesting = `` /* 127-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 = `{
"url": "http://localhost-secret"
}`
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 `json:"url,omitempty" yaml:"url,omitempty"` MessageType string `json:"messageType,omitempty" yaml:"messageType,omitempty"` Title string `json:"title,omitempty" yaml:"title,omitempty"` Description string `json:"description,omitempty" yaml:"description,omitempty"` }
func NewConfig ¶
func NewConfig(jsonData json.RawMessage, decryptFn receivers.DecryptFunc) (Config, error)
type Notifier ¶
Notifier defines URL property for Victorops REST API and handles notification process by formatting POST body according to Victorops specifications (http://victorops.force.com/knowledgebase/articles/Integration/Alert-Ingestion-API-Documentation/)
func New ¶
func New(cfg Config, meta receivers.Metadata, template *templates.Template, sender receivers.WebhookSender, images images.Provider, logger logging.Logger, appVersion string) *Notifier
New creates an instance of VictoropsNotifier that handles posting notifications to Victorops REST API
func (*Notifier) SendResolved ¶
Click to show internal directories.
Click to hide internal directories.