Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// URL the client sends POST requests to
URL string
// contains filtered or unexported fields
}
Client is the client used to POST webhook requests to the local endpoint.
func (*Client) SupportsEventType ¶
SupportsEventType takes an event of a webhook and compares it to the internal list of supported events
type Config ¶
type Config struct {
HTTPClient *http.Client
Log *log.Logger
ResponseHandler ResponseHandler
}
Config contains the optional configuration parameters of a Client.
type ResponseHandler ¶
ResponseHandler handles a response from the endpoint.
type ResponseHandlerFunc ¶
ResponseHandlerFunc is an adapter to allow the use of ordinary functions as response handlers. If f is a function with the appropriate signature, ResponseHandler(f) is a ResponseHandler that calls f.
func (ResponseHandlerFunc) ProcessResponse ¶
func (f ResponseHandlerFunc) ProcessResponse(webhookID string, resp *http.Response)
ProcessResponse calls f(webhookID, resp).
Click to show internal directories.
Click to hide internal directories.