Documentation
¶
Overview ¶
Package webhook implements notifier.Provider as an HTTP POST to a configured URL. The body is the JSON-encoded notifier.Notification; when Token is set, the request carries "Authorization: Bearer <token>" so the receiver can identify the calling host. Format and rotation of the token live entirely on the receiver side — this Provider treats it as an opaque string.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider POSTs Notifications to URL. Construct with New.
func New ¶
New constructs a Provider. A nil logger uses a stderr-prefixed default. Empty token sends unauthenticated requests — fine for dev against a local sink, never for production.
Click to show internal directories.
Click to hide internal directories.