ghook

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package ghook provides functionality to unmarshal a JSON payload including verifying the signature for Github Hooks.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptySecret       = errors.New("ghook: empty secret provided")
	ErrHookMisconfigured = errors.New("ghook: hook secret not configured on github")
	ErrInvalidSigPrefix  = errors.New("ghook: invalid signature prefix")
	ErrInvalidSigHex     = errors.New("ghook: invalid signature hex")
	ErrSigMismatch       = errors.New("ghook: signature mismatch")
)

Functions

func Unmarshal

func Unmarshal(secret []byte, r *http.Request, v interface{}) error

Unmarshal the hook payload, ensuring it is signed using the provided secret.

Types

This section is empty.

Jump to

Keyboard shortcuts

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