github

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithPayloadSecret

func WithPayloadSecret(secret string) option

Types

type Event added in v0.8.0

type Event struct {
	// DeliveryID is the unique github ID of the event
	DeliveryID string
	// Type is the github webhook event type returned by github.WebHookType()
	Type string
	// JSON is the event payload as JSON
	JSON []byte
	// Event is the parsed JSON payload as struct type returned by github.ParseWebHook()
	Event     any
	LogFields []zap.Field
}

Event is the preprocessed Github Webhook event

type Provider

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

Provider listens for github-webhook http-requests at a http-server handler. It validates, parses the webhook events and forwards them to event channels.

func New

func New(eventChans []chan<- *Event, opts ...option) *Provider

func (*Provider) HTTPHandler added in v0.8.0

func (p *Provider) HTTPHandler(resp http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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