webhook

package
v0.0.0-...-80bedfa Latest Latest
Warning

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

Go to latest
Published: May 3, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook interface {
	// Trigger the hook.
	Trigger() error
}

A Hook triggers an action in an external process by making an HTTP request.

type Webhook

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

A Webhook triggers an action in an external process by making a basic HTTP GET request with no parameters or request body.

func New

func New(url string) *Webhook

New creates a new Webhook.

func (*Webhook) Trigger

func (h *Webhook) Trigger() error

Trigger sends an HTTP GET to the webhook's URL. Trigger returns an error when it encounters any HTTP status code that is not a 200 OK.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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