resources

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DockerHubEventType = "push"
)

Variables

View Source
var (
	ErrInvalidHTTPMethod = errors.New("invalid HTTP Method")
	ErrParsingPayload    = errors.New("error parsing payload")
)

parse errors

Functions

func Parse

func Parse(r *http.Request) (interface{}, error)

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

Types

type CallbackPayload

type CallbackPayload struct {
	State       Status `json:"state"`
	Description string `json:"description"`
	Context     string `json:"context"`
	TargetURL   string `json:"target_url"`
}

func (*CallbackPayload) EmitValidationCallback

func (callback *CallbackPayload) EmitValidationCallback(callbackURL string) error

EmitValidationCallback send callback to given callbackURL

type Status

type Status string
const (
	StatusSuccess Status = "success"
	StatusFailure Status = "failure"
	StatusError   Status = "error"
)

Jump to

Keyboard shortcuts

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