webhook

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DestTypeWebhook  = "builtin-webhook"
	FieldWebhookURL  = "webhook_url"
	ParamBody        = "body"
	ParamContentType = "content_type"
	FallbackIconURL  = "builtin://webhook"
)

Variables

This section is empty.

Functions

func NewWebhookDest added in v0.33.0

func NewWebhookDest(url string) gadb.DestV1

Types

type POSTDataAlert

type POSTDataAlert struct {
	AppName     string
	Type        string
	AlertID     int
	Summary     string
	Details     string
	ServiceID   string
	ServiceName string
	Meta        map[string]string
}

POSTDataAlert represents fields in outgoing alert notification.

type POSTDataAlertBundle

type POSTDataAlertBundle struct {
	AppName     string
	Type        string
	ServiceID   string
	ServiceName string
	Count       int
}

POSTDataAlertBundle represents fields in outgoing alert bundle notification.

type POSTDataAlertStatus

type POSTDataAlertStatus struct {
	AppName  string
	Type     string
	AlertID  int
	LogEntry string
}

POSTDataAlertStatus represents fields in outgoing alert status notification.

type POSTDataAlertStatusBundle

type POSTDataAlertStatusBundle struct {
	AppName  string
	Type     string
	AlertID  int
	LogEntry string
	Count    int
}

POSTDataAlertStatusBundle represents fields in outgoing alert status bundle notification.

type POSTDataOnCallNotification added in v0.31.0

type POSTDataOnCallNotification struct {
	AppName      string
	Type         string
	Users        []POSTDataOnCallUser
	ScheduleID   string
	ScheduleName string
	ScheduleURL  string
}

POSTDataOnCallNotification represents fields in outgoing on call notification.

type POSTDataOnCallUser added in v0.31.0

type POSTDataOnCallUser struct {
	ID   string
	Name string
	URL  string
}

POSTDataOnCallUser represents User fields in outgoing on call notification.

type POSTDataTest

type POSTDataTest struct {
	AppName string
	Type    string
}

POSTDataTest represents fields in outgoing test notification.

type POSTDataVerification

type POSTDataVerification struct {
	AppName string
	Type    string
	Code    string
}

POSTDataVerification represents fields in outgoing verification notification.

type Sender

type Sender struct{}

func NewSender

func NewSender(ctx context.Context) *Sender

func (*Sender) DisplayInfo added in v0.33.0

func (s *Sender) DisplayInfo(ctx context.Context, args map[string]string) (*nfydest.DisplayInfo, error)

func (Sender) ID added in v0.33.0

func (Sender) ID() string

func (*Sender) SendMessage added in v0.33.0

func (s *Sender) SendMessage(ctx context.Context, msg notification.Message) (*notification.SentMessage, error)

Send will send an alert for the provided message type

func (Sender) TypeInfo added in v0.33.0

func (Sender) TypeInfo(ctx context.Context) (*nfydest.TypeInfo, error)

func (*Sender) ValidateField added in v0.33.0

func (s *Sender) ValidateField(ctx context.Context, fieldID, value string) error

Jump to

Keyboard shortcuts

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