Versions in this module Expand all Collapse all v0 v0.1.0 Oct 14, 2026 Changes in this version + const ColAttempts + const ColCreatedAt + const ColDesc + const ColDisabledBy + const ColEnabled + const ColEndpointID + const ColEventType + const ColEvents + const ColFinishedAt + const ColID + const ColLastError + const ColLastStatus + const ColMessageID + const ColNextAttempt + const ColPayload + const ColPrevSecret + const ColPrevUntil + const ColSecret + const ColStatus + const ColURL + const ColUpdatedAt + const DefaultBatch + const DefaultConcurrency + const DefaultMaxAttempts + const DefaultPageSize + const DefaultRetention + const DefaultRetryBase + const DefaultRetryMax + const DefaultRotationGrace + const DefaultTimeout + const DisabledGone + const DisabledManual + const IDPrefixDelivery + const IDPrefixEndpoint + const MaxDescriptionLength + const MaxEndpoints + const MaxEventFilters + const MaxPageSize + const MaxURLLength + const PluginName + const TableNameDelivery + const TableNameEndpoint + var ErrBadDescription = auth.NewError("webhook.bad_description", http.StatusBadRequest, ...) + var ErrBadEventType = auth.NewError("webhook.bad_event_type", http.StatusBadRequest, ...) + var ErrBadSecret = auth.NewError("webhook.bad_secret", http.StatusBadRequest, ...) + var ErrBadURL = auth.NewError("webhook.bad_url", http.StatusBadRequest, ...) + var ErrDeliveryNotFound = auth.NewError("webhook.delivery_not_found", http.StatusNotFound, ...) + var ErrDestinationRefused = auth.NewError("webhook.destination_refused", http.StatusBadRequest, ...) + var ErrEndpointDisabled = auth.NewError("webhook.endpoint_disabled", http.StatusConflict, ...) + var ErrEndpointNotFound = auth.NewError("webhook.endpoint_not_found", http.StatusNotFound, ...) + var ErrNoEncryptionKey = auth.NewError("webhook.no_encryption_key", http.StatusInternalServerError, ...) + var ErrTooManyEndpoints = auth.NewError("webhook.too_many_endpoints", http.StatusConflict, ...) + var EventTypeValues = []EventType + var StatusValues = []Status + var TableDelivery = sqlb.Table + var TableEndpoint = sqlb.Table + type Delivery struct + Attempts int + CreatedAt time.Time + EndpointID string + EventType EventType + FinishedAt *time.Time + ID string + LastError string + LastStatus int + MessageID string + NextAttemptAt time.Time + Payload json.RawMessage + Status Status + type DeliveryPage struct + Deliveries []Delivery + Limit int + Page int + Total int64 + type DeliveryQuery struct + EndpointID string + EventType EventType + Limit int + MessageID string + Page int + Status Status + type Endpoint struct + CreatedAt time.Time + Description string + DisabledReason string + Enabled bool + Events []string + ID string + URL string + UpdatedAt time.Time + type EndpointInput struct + Description string + Events []string + Secret string + URL string + type EndpointUpdate struct + Description *string + Enabled *bool + Events *[]string + URL *string + type Envelope struct + Data any + Timestamp time.Time + Type EventType + type EventType = string + const EventIdentityCreated + const EventIdentityDeleted + const EventIdentityUpdated + const EventSessionCreated + const EventSessionRevoked + const EventUserCreated + const EventUserDeleted + const EventUserUpdated + const SecurityEventPrefix + type IdentityData struct + ID string + IsPrimary bool + Kind string + UserID string + Value string + Verified bool + VerifiedAt *time.Time + type Option func(*Plugin) + func AllowPrivateNetworks() Option + func Retention(d time.Duration) Option + func Retry(r RetryPolicy) Option + func Timeout(d time.Duration) Option + func WithSealer(s auth.Sealer) Option + type Plugin struct + func New(opts ...Option) *Plugin + func (p *Plugin) CreateEndpoint(ctx context.Context, in EndpointInput) (Endpoint, string, error) + func (p *Plugin) DataHooks() auth.DataHooks + func (p *Plugin) DeleteEndpoint(ctx context.Context, id string) error + func (p *Plugin) Deliveries(ctx context.Context, q DeliveryQuery) (DeliveryPage, error) + func (p *Plugin) Delivery(ctx context.Context, id string) (Delivery, error) + func (p *Plugin) Endpoint(ctx context.Context, id string) (Endpoint, error) + func (p *Plugin) EndpointSecret(ctx context.Context, id string) (string, error) + func (p *Plugin) Endpoints(ctx context.Context) ([]Endpoint, error) + func (p *Plugin) Init(a *auth.Auth) error + func (p *Plugin) Maintain(ctx context.Context, o auth.MaintainOptions) (map[string]int64, error) + func (p *Plugin) Name() string + func (p *Plugin) OptionErr() error + func (p *Plugin) Publish(ctx context.Context, eventType EventType, data any) error + func (p *Plugin) Replay(ctx context.Context, id string) (Delivery, error) + func (p *Plugin) RotateSecret(ctx context.Context, id string, grace time.Duration) (string, error) + func (p *Plugin) SecuritySink() auth.SecuritySink + func (p *Plugin) Sweep(ctx context.Context, _ time.Time) (int64, error) + func (p *Plugin) Tables() []sqlb.Table + func (p *Plugin) TypedMigrations(engine string, t auth.SQLTypes) ([]auth.Migration, error) + func (p *Plugin) UpdateEndpoint(ctx context.Context, id string, in EndpointUpdate) (Endpoint, error) + type RetryPolicy struct + Base time.Duration + Max time.Duration + MaxAttempts int + type SecurityData struct + Attrs map[string]string + ID string + IP string + Kind string + Op string + Outcome string + Plugin string + Severity string + Transport string + UserID string + type SessionData struct + CreatedAt time.Time + ExpiresAt time.Time + ID string + IP string + ImpersonatedBy string + UserAgent string + UserID string + type SessionRevokedData struct + Reason string + type Status string + const StatusCancelled + const StatusDead + const StatusDelivered + const StatusPending + type UserData struct + CreatedAt time.Time + ID string + Image string + Name string + UpdatedAt time.Time