Versions in this module Expand all Collapse all v0 v0.0.7 Oct 27, 2026 v0.0.6 Oct 16, 2026 Changes in this version + const DefaultPoll + const EventTest + const MaxBodyBytes + const OutcomeDelivered + const OutcomeDropped + const OutcomeFailed + const OutcomeSuperseded + var ErrBlockedAddress = errors.New("approvalnotify: refusing to connect to a non-public address") + var ErrMetadataAddress = errors.New("approvalnotify: refusing to connect to a cloud metadata service") + var ErrRedirect = errors.New(...) + func CheckAddress(ip netip.Addr, allow []netip.Prefix) error + func IsPermanent(err error) bool + func Render(kind string, n Notice, link string, now time.Time) ([]byte, error) + func Superseded(n Notice, snap Snapshot, now time.Time) bool + func Test(ctx context.Context, w config.NotificationWebhook, link string, now time.Time) error + type Client struct + func NewClient(allow []netip.Prefix, caFile string, timeout time.Duration) (*Client, error) + func (c *Client) Post(ctx context.Context, rawURL string, body []byte) error + type Engine struct + func New(opts Options) *Engine + func (e *Engine) Pass(ctx context.Context) error + func (e *Engine) Run(ctx context.Context) + type Notice struct + At time.Time + CreatedBy string + Deadline time.Time + DecidedBy string + Event string + RequestID string + RequestedBy string + Roles []string + SecretKind string + SecretName string + Subject string + TokenID string + TokenName string + func Scan(snap Snapshot, since, now time.Time) []Notice + func (n Notice) Key() string + type Options struct + Logf func(format string, args ...any) + LookupEnv func(name string) (string, bool) + Now func() time.Time + Nudge <-chan struct{} + OnRecorded func([]Notice) + OpenDB func() (*statedb.DB, error) + Poll time.Duration + Record func(sink, event, outcome string) + Settings func() (Settings, error) + Snapshot func(ctx context.Context) (Snapshot, error) + type SendError struct + Err error + Permanent bool + Status int + func (e *SendError) Error() string + func (e *SendError) Unwrap() error + type Settings struct + Link string + Webhooks []config.NotificationWebhook + type Snapshot struct + Requests []secretbroker.AccessRequest + RequestsKnown bool + TokensKnown bool + Waiting []TokenInfo + type TokenInfo struct + CreatedAt time.Time + CreatedBy string + ExpiresAt time.Time + ID string + Name string + Roles []string