Help us shape the future of Go! Take the 2026 Go Developer Survey

github

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RegexParseHeader = regexp.MustCompile("^\\s*([^\\:]+)\\s*:\\s*(.*)$")

Functions

func ActionRoute

func ActionRoute(_ context.Context, c *cli.Command) error

func IsValidGithubSignature

func IsValidGithubSignature(secret string, message []byte) bool

func MustMakeHeader

func MustMakeHeader(
	target *url.URL, origin string, headerStrings []string,
) http.Header

func MustParseHeader

func MustParseHeader(header string) (string, string)

func MustParseHeaders

func MustParseHeaders(headerStrings []string) http.Header

func SecureEqual

func SecureEqual(x, y string) bool

func Sha256HMAC added in v0.18.0

func Sha256HMAC(key string, payload []byte) string

Types

type Event

type Event struct {
	Type string

	Repository *Repository `json:"repository"`
	Pusher     *Pusher     `json:"pusher"`

	Ref    string `json:"ref"`
	Before string `json:"before"`
	After  string `json:"after"`
}

func (*Event) Branch

func (e *Event) Branch() string

type Pusher

type Pusher struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

type Repository

type Repository struct {
	FullName string `json:"full_name"`
}

type Router

type Router struct{}

func (*Router) Name

func (r *Router) Name() string

func (*Router) Route

func (r *Router) Route(in hookbot.Message, publish func(hookbot.Message) bool)

func (*Router) Topics

func (r *Router) Topics() []string

Jump to

Keyboard shortcuts

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