circleci

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmptyToken is used the the incoming request has not token set
	ErrEmptyToken = errors.New("the token can't be empty")
	// ErrInvalidToken is used the the incoming request has an invalid token
	ErrInvalidToken = errors.New("the token is invalid")
	// ErrReadBody is used the the incoming request can't be read
	ErrReadBody = errors.New("failed to read the request body")
)

Functions

This section is empty.

Types

type Parser

type Parser struct{}

Parser is the GitHub webhook parser.

func (*Parser) GetName

func (p *Parser) GetName() string

GetName returns the parser name.

func (*Parser) Parse

func (p *Parser) Parse(headers map[string][]string, payload []byte) (provider.Event, error)

Parse parses the incoming webhook.

type Validator

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

func NewValidator

func NewValidator(secret string) *Validator

func (*Validator) IsSupported

func (g *Validator) IsSupported(incomingProvider string) bool

func (*Validator) Validate

func (v *Validator) Validate(r *http.Request) error

Jump to

Keyboard shortcuts

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