Documentation
¶
Index ¶
Constants ¶
View Source
const HeaderName = "X-Hub-Signature"
HeaderName is the name of the header containing the signature GitHub sends
Variables ¶
View Source
var ( // Error condition when a request is missing a header ErrMissingHeader = errors.New("Missing Header") // Error condition when a request has a header but the contents are invalid ErrInvalidSignature = errors.New("Invalid Signature") // Error condition when a request has no body ErrMissingBody = errors.New("Missing Body") // Error condition when a request has an invalid method ErrMethodNotAllowed = errors.New("Method not allowed") )
Functions ¶
This section is empty.
Types ¶
type GitHubWebhookAuth ¶
type GitHubWebhookAuth struct {
SecretKey []byte
}
func New ¶
func New(secretKey string) *GitHubWebhookAuth
New returns an instance of GitHubWebhookAuth middleware
func (*GitHubWebhookAuth) Handler ¶
func (g *GitHubWebhookAuth) Handler(h http.Handler) http.Handler
Handler returns net/http compatible middleware handler
func (*GitHubWebhookAuth) HandlerWithNext ¶
func (g *GitHubWebhookAuth) HandlerWithNext(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
HandlerWithNext is a Negroni compatible middleware function
Click to show internal directories.
Click to hide internal directories.
