Documentation
¶
Overview ¶
Package webhook implements a local HTTP catch-all server for inspecting outbound webhook payloads. It records every inbound request, formats the body as pretty-printed JSON where possible, and exposes requests over a channel so the TUI can live-render them.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendRequest ¶
SendRequest is a helper for goroutines that need to push a request into the Bubble Tea program from outside the model.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the Bubble Tea model for the webhook catch TUI.
type Request ¶
type Request struct {
Time time.Time
Method string
Path string
UserAgent string
Headers map[string]string
Body string // raw body
BodyJSON string // pretty-printed JSON, empty if not JSON
Duration time.Duration
StatusCode int // always 200 — we always accept
}
Request captures a single inbound request to the catch server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the webhook catch server.
func New ¶
New creates a new catch server on the given port. Received requests are sent to the returned channel.
Click to show internal directories.
Click to hide internal directories.