notifications

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeploymentTemplateValues added in v1.0.0

type DeploymentTemplateValues struct {
	Status      string              `json:"status"`
	Application model.ApplicationId `json:"application"`
	Version     string              `json:"version"`
	Summary     []string            `json:"summary"`
	URL         string              `json:"url"`
}

type IncidentNotifier

type IncidentNotifier struct {
	// contains filtered or unexported fields
}

func NewIncidentNotifier

func NewIncidentNotifier(db *db.DB) *IncidentNotifier

func (*IncidentNotifier) Enqueue

func (n *IncidentNotifier) Enqueue(project *db.Project, app *model.Application, incident *model.ApplicationIncident, now timeseries.Time)

type IncidentTemplateValues added in v1.0.0

type IncidentTemplateValues struct {
	Status      string                                 `json:"status"`
	Application model.ApplicationId                    `json:"application"`
	Reports     []db.IncidentNotificationDetailsReport `json:"reports"`
	URL         string                                 `json:"url"`
}

type NotificationClient

type NotificationClient interface {
	SendIncident(ctx context.Context, baseUrl string, n *db.IncidentNotification) error
}

type Opsgenie

type Opsgenie struct {
	// contains filtered or unexported fields
}

func NewOpsgenie

func NewOpsgenie(apiKey string, euInstance bool) *Opsgenie

func (*Opsgenie) SendIncident

func (og *Opsgenie) SendIncident(ctx context.Context, baseUrl string, n *db.IncidentNotification) error

type Pagerduty

type Pagerduty struct {
	// contains filtered or unexported fields
}

func NewPagerduty

func NewPagerduty(integrationKey string) *Pagerduty

func (*Pagerduty) SendIncident

func (pd *Pagerduty) SendIncident(ctx context.Context, baseUrl string, n *db.IncidentNotification) error

type Slack

type Slack struct {
	// contains filtered or unexported fields
}

func NewSlack

func NewSlack(token, channel string) *Slack

func (*Slack) SendDeployment

func (s *Slack) SendDeployment(ctx context.Context, project *db.Project, ds model.ApplicationDeploymentStatus) error

func (*Slack) SendIncident

func (s *Slack) SendIncident(ctx context.Context, baseUrl string, n *db.IncidentNotification) error

type Teams

type Teams struct {
	// contains filtered or unexported fields
}

func NewTeams

func NewTeams(webhookUrl string) *Teams

func (*Teams) SendDeployment

func (t *Teams) SendDeployment(ctx context.Context, project *db.Project, ds model.ApplicationDeploymentStatus) error

func (*Teams) SendIncident

func (t *Teams) SendIncident(ctx context.Context, baseUrl string, n *db.IncidentNotification) error

type Webhook added in v1.0.0

type Webhook struct {
	// contains filtered or unexported fields
}

func NewWebhook added in v1.0.0

func NewWebhook(cfg *db.IntegrationWebhook) *Webhook

func (*Webhook) SendDeployment added in v1.0.0

func (wh *Webhook) SendDeployment(ctx context.Context, project *db.Project, ds model.ApplicationDeploymentStatus) error

func (*Webhook) SendIncident added in v1.0.0

func (wh *Webhook) SendIncident(ctx context.Context, baseUrl string, n *db.IncidentNotification) error

Jump to

Keyboard shortcuts

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