Documentation
¶
Overview ¶
Package pidgeon is Pidgeon's webhook protocol: its calls are signed, with the endpoint's whsec_ secret, in Pidgeon-Signature, as t=<seconds>,v1=<hex HMAC-SHA256 of "<t>.<body>">, which is too old after five minutes, say what happened in Pidgeon-Event, and the body's type, and their delivery in the body's id
Index ¶
- Constants
- type Protocol
- func (Protocol) Check(string, http.Header) error
- 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) Sample(delivery string) (http.Header, []byte)
- func (Protocol) Sign(header http.Header, body []byte, secret string)
- func (Protocol) Verify(header http.Header, body []byte, secret string) error
Constants ¶
const (
// Name is the protocol's name
Name = "pidgeon"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Protocol ¶
type Protocol struct{}
Protocol is Pidgeon's protocol
func (Protocol) Check ¶ added in v1.7.4
Check returns nil, as it isn't known which calls Pidgeon doesn't make
func (Protocol) Identify ¶
Identify returns Pidgeon-Event, or the body's type, such as message.received, and the body's id