Documentation
¶
Overview ¶
Package webhook provides a generic webhook interface for receiving external events.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Source string `json:"source"`
Type string `json:"type"`
Body json.RawMessage `json:"body"`
Headers map[string]string `json:"headers,omitempty"`
}
Event represents an incoming webhook event.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server manages webhook endpoints and routes events to handlers.
func NewServer ¶
NewServer creates a webhook server. secret is optional; if provided, it validates X-Webhook-Secret header.
Click to show internal directories.
Click to hide internal directories.