webhook

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0 Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
	GoAlertURL  string
}

POSTDataAlert represents fields in outgoing alert notification.

type POSTDataAlertBundle

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

POSTDataAlertBundle represents fields in outgoing alert bundle notification.

type POSTDataAlertStatus

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

POSTDataAlertStatus represents fields in outgoing alert status notification.

type POSTDataAlertStatusBundle

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

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 {
	Client *http.Client
}

func NewSender

func NewSender(ctx context.Context, client *http.Client) *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