webhook

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "webhook"

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	ID       string            `mapstructure:"id,omitempty"`
	URL      string            `mapstructure:"url,omitempty"`
	Method   string            `mapstructure:"method,omitempty"`
	Headers  map[string]string `mapstructure:"headers,omitempty"`
	Template string            `mapstructure:"template,omitempty"`
}

type Provider

type Provider struct {
	Webhook []*Options `mapstructure:"webhook,omitempty"`
	// contains filtered or unexported fields
}

func New

func New(client *http.Client, options []*Options) (*Provider, error)

func (*Provider) Send

func (pr *Provider) Send(ctx context.Context, message string, extras map[string]string) error

Jump to

Keyboard shortcuts

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