Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Mount ¶
Mount mounts the hook and corresponding sink list under the given path.
- If you mount the foo hook handler at /foo, then you go to service foo's webhook setting page and configure the webhook to post events to <<Relay Host>>/foo. - If you want the hook handler at /foo to pass the payload to sink [bar, baz], then you pass the [bar, baz] sink list.
e.g hook.Mount(fs, f, "/foo", fooHook, [barSink, bazSink])
Types ¶
type Hooker ¶
type Hooker interface {
// contains filtered or unexported methods
}
Hooker is the interface for the webhook originator.
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Response defines the handler's return value
- Sets http.StatusOK and payload if you want the coresponding sink list to process the payload.
- Sets other 2xx code if you want to short-circuit the processing, but you don't want to indicate an error (e.g. skip the processing). You can optionally set a detail to explain the reason. This will show up on the webhook sender's page.
- Sets other HTTP code and error detail if you do want to indicate an error.
Click to show internal directories.
Click to hide internal directories.