Documentation
¶
Overview ¶
Package common has what the webhook protocols share: their bodies as JSON values, signatures compared in constant time, and a JSON object's fields
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
Decode returns the body as JSON values: as it is, when it's JSON, an object of its fields, when it's a form, whose fields with more than one value are arrays, a string, when it's other text, or nil, when it's empty, or isn't text
func Equal ¶
Equal returns whether the signature, which isn't empty, is the expected one, in constant time
func EqualString ¶
EqualString returns whether the strings, the first of which isn't empty, are equal, in constant time
func Field ¶
func Field(values json.RawMessage, path ...string) string
Field returns the field of the JSON object, at the path, such as msg, id, as text, when it's a string, or a number, as it was sent, or empty, when it isn't one
Types ¶
This section is empty.