notifications

package
v1.41.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaID = "builtin:problem.notifications"
View Source
const SchemaVersion = "1.4.7"

Variables

View Source
var Types = struct {
	Email        Type
	Slack        Type
	Jira         Type
	AnsibleTower Type
	OpsGenie     Type
	PagerDuty    Type
	VictorOps    Type
	WebHook      Type
	XMatters     Type
	Trello       Type
	ServiceNow   Type
}{
	Type("EMAIL"),
	Type("SLACK"),
	Type("JIRA"),
	Type("ANSIBLETOWER"),
	Type("OPS_GENIE"),
	Type("PAGER_DUTY"),
	Type("VICTOROPS"),
	Type("WEBHOOK"),
	Type("XMATTERS"),
	Type("TRELLO"),
	Type("SERVICE_NOW"),
}

Functions

func Duplicates

func Duplicates(service settings.RService[*Notification], v *Notification) (*api.Stub, error)

func Service

func Service(credentials *settings.Credentials, t Type) settings.CRUDService[*Notification]

Types

type Notification

type Notification struct {
	Enabled   bool    `json:"enabled"`
	Name      string  `json:"displayName"`
	ProfileID string  `json:"alertingProfile"`
	Type      Type    `json:"type"`
	LegacyID  *string `json:"-"`

	Email        *email.Email           `json:"emailNotification,omitempty"`
	Slack        *slack.Slack           `json:"slackNotification,omitempty"`
	Jira         *jira.Jira             `json:"jiraNotification,omitempty"`
	AnsibleTower *ansible.AnsibleTower  `json:"ansibleTowerNotification,omitempty"`
	OpsGenie     *opsgenie.OpsGenie     `json:"opsGenieNotification,omitempty"`
	PagerDuty    *pagerduty.PagerDuty   `json:"pagerDutyNotification,omitempty"`
	VictorOps    *victorops.VictorOps   `json:"victorOpsNotification,omitempty"`
	WebHook      *webhook.WebHook       `json:"webHookNotification,omitempty"`
	XMatters     *xmatters.XMatters     `json:"xMattersNotification,omitempty"`
	Trello       *trello.Trello         `json:"trelloNotification,omitempty"`
	ServiceNow   *servicenow.ServiceNow `json:"serviceNowNotification,omitempty"`
}

func UseOAuth2Fix

func UseOAuth2Fix(v *Notification, err error) *Notification

func (*Notification) FillDemoValues

func (me *Notification) FillDemoValues() []string

func (*Notification) MarshalHCL

func (me *Notification) MarshalHCL(properties hcl.Properties) error

func (*Notification) PrepareMarshalHCL

func (me *Notification) PrepareMarshalHCL(decoder hcl.Decoder) error

func (*Notification) Schema

func (me *Notification) Schema() map[string]*schema.Schema

func (*Notification) UnmarshalHCL

func (me *Notification) UnmarshalHCL(decoder hcl.Decoder) error

type Type

type Type string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL