azuredevops

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidHTTPMethod           = errors.New("invalid HTTP Method")
	ErrParsingPayload              = errors.New("error parsing payload")
	ErrBasicAuthVerificationFailed = errors.New("basic auth verification failed")
)

parse errors

View Source
var Options = WebhookOptions{}

Options is a namespace var for configuration options

Functions

This section is empty.

Types

type Option

type Option func(*Webhook) error

Option is a configuration option for the webhook

type Webhook

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

Webhook instance contains all methods needed to process events

func New

func New(options ...Option) (*Webhook, error)

New creates and returns a WebHook instance

func (Webhook) Parse

func (hook Webhook) Parse(r *http.Request, events ...azuredevops.Event) (interface{}, error)

Parse verifies and parses the events specified and returns the payload object or an error

type WebhookOptions

type WebhookOptions struct{}

WebhookOptions is a namespace for configuration option methods

func (WebhookOptions) BasicAuth

func (WebhookOptions) BasicAuth(username, password string) Option

BasicAuth verifies payload using basic auth

Jump to

Keyboard shortcuts

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