Documentation
¶
Overview ¶
Package generic is the webhook protocol of a service which has none of its own: its calls are verified by the secret, as a bearer token, when the service can send one, and say nothing of what happened
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(http.Header, json.RawMessage) (string, string)
- func (Protocol) Name() string
- func (Protocol) Sample(string) (http.Header, []byte)
- func (Protocol) Sign(header http.Header, _ []byte, secret string)
- func (Protocol) Verify(header http.Header, _ []byte, secret string) error
Constants ¶
const Name = "generic"
Name is the protocol's name
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Protocol ¶
type Protocol struct{}
Protocol is the generic protocol
func (Protocol) Check ¶ added in v1.7.4
Check returns nil, as any call can be of a service without a protocol