webhook

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MacrosLevel     = "$level"
	MacrosAlertName = "$alert_name"
	MacrosText      = "$text"
	MacrosImage     = "$image"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

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

func NewCore

func NewCore(cfg webhook.Settings) *Core

func (*Core) Send

func (w *Core) Send(body io.Reader, m *message.Message) (*http.Response, error)

type Webhook

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

Webhook implements a Provider for webhook notifications.

func New

func New(cfg webhook.Webhook, logger *zap.Logger) (*Webhook, error)

func (*Webhook) Name

func (w *Webhook) Name() string

func (*Webhook) Send

func (w *Webhook) Send(m *message.Message) error

Jump to

Keyboard shortcuts

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