github

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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