webhook

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dispatcher

type Dispatcher interface {
	Dispatch(event Event)
}

Dispatcher delivers webhook events to configured URLs. Dispatch is fire-and-forget: implementations handle queuing, delivery, and retries.

type DispatcherConfig

type DispatcherConfig struct {
	Type      string     `json:"type,omitempty"`
	Endpoints []Endpoint `json:"endpoints,omitempty"`
}

DispatcherConfig holds the configuration for the webhook dispatcher.

type Endpoint

type Endpoint struct {
	URL        string `json:"url"`
	SigningKey string `json:"signing_key,omitempty"`
}

Endpoint pairs a webhook URL with an optional signing key.

type Event

type Event struct {
	Type      EventType      `json:"type"`
	Timestamp time.Time      `json:"timestamp"`
	Data      map[string]any `json:"data"`
}

type EventType

type EventType string
const (
	EventDomainVerified EventType = "domain_verified"
)

type NoopDispatcher

type NoopDispatcher struct{}

NoopDispatcher silently discards all events. Used when no webhook_dispatcher is configured.

func (NoopDispatcher) Dispatch

func (NoopDispatcher) Dispatch(Event)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL