webhook

package
v0.31.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaskURLPass

func MaskURLPass(u *url.URL) string

MaskURLPass will mask the password (if any) in the URL.

Types

type POSTDataAlert

type POSTDataAlert struct {
	AppName     string
	Type        string
	AlertID     int
	Summary     string
	Details     string
	ServiceID   string
	ServiceName 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) FriendlyValue

func (Sender) FriendlyValue(ctx context.Context, value string) (string, error)

FriendlyValue will return a display-ready version of the URL with the password masked, query removed, and the path truncated to 15 chars.

func (*Sender) Send

Send will send an alert for the provided message type

Jump to

Keyboard shortcuts

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