Documentation
¶
Overview ¶
Package github is GitHub's webhook protocol: its calls are signed, with the secret, in X-Hub-Signature-256, say what happened in X-GitHub-Event, and the body's action, and their delivery in X-GitHub-Delivery. A call whose content type is a form has its JSON in the form's payload field.
https://docs.github.com/en/webhooks/using-webhooks/validating-webhook-deliveries
Index ¶
- Constants
- type Protocol
- func (Protocol) Decode(header http.Header, body []byte) (json.RawMessage, error)
- func (Protocol) Handshake(*http.Request, string) ([]byte, bool)
- func (Protocol) Headers() []string
- func (Protocol) Identify(header http.Header, values json.RawMessage) (string, string)
- func (Protocol) Name() string
- func (Protocol) Verify(header http.Header, body []byte, secret string) error
Constants ¶
const (
// Name is the protocol's name
Name = "github"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Protocol ¶
type Protocol struct{}
Protocol is GitHub's protocol
func (Protocol) Decode ¶
Decode returns the body, or, when it's a form, its payload field, which is the JSON