github

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: BSD-2-Clause Imports: 15 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(c *cli.Context)

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 Sha1HMAC

func Sha1HMAC(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