webhook

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrNilConfigData will be returned when config is nil
	ErrNilConfigData = fmt.Errorf("config data is nil")
)

Functions

This section is empty.

Types

type Webhook

type Webhook struct {
	URL   string
	Token string
}

Webhook implements the Notifier interface

func (*Webhook) Init

func (w *Webhook) Init(config interface{}) error

Init initalizes the webhook notifier, reads config file and configures the necessary parameters for webhook notifications to work

func (*Webhook) SendNotification

func (w *Webhook) SendNotification(data interface{}) error

SendNotification sends webhook notification i.e sends a http POST request to the configured URL

Jump to

Keyboard shortcuts

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