Versions in this module Expand all Collapse all v0 v0.3.0 Aug 15, 2026 Changes in this version + var ErrAlreadySent = errors.New("this idempotency key has already been used; not sending again") + var ErrBadPrincipal = errors.New("the acting principal is not one that can be audited") + var ErrBlockedSF001 = errors.New(...) + var ErrNeedApproval = errors.New("this action leaves the organisation and needs a human approval") + var ErrNeedIdem = errors.New("a live send needs an idempotency key") + var ErrNotConfigured = errors.New("this connection is not configured") + var ErrUnknownAction = errors.New("no such action") + var ErrUnknownKind = errors.New("no such connection kind") + func Kinds() []string + func Register(a Actor) + func RetryAfterOr(out ActOutput, def time.Duration) time.Duration + type ActInput struct + Action string + Actor Principal + ApprovalID string + DryRun bool + Idem string + Params json.RawMessage + RunID string + type ActOutput struct + Preview string + ProviderRef string + Result json.RawMessage + RetryAfter time.Duration + Retryable bool + type ActionSpec struct + Description Text + Destructive bool + External bool + Grant string + Idempotent bool + InputSchema json.RawMessage + Name string + RatePerMin int + Title Text + func SpecFor(kind, action string) (ActionSpec, bool) + func Validate(kind string, in ActInput) (ActionSpec, error) + type Actor interface + Act func(ctx context.Context, in ActInput, cfg json.RawMessage, sec Secrets) (ActOutput, error) + Actions func() []ActionSpec + Kind func() string + func Get(kind string) (Actor, bool) + type Blocked struct + Kind string + Name string + func (b Blocked) Reveal(_ context.Context, name string) (string, error) + type OutboxRow struct + Action string + Actor Principal + ApprovalID string + ConnectionID string + Idem string + Kind string + Params json.RawMessage + Preview string + type Principal struct + ID string + Kind string + Slug string + func (p Principal) Valid() bool + type Runner struct + Log *slog.Logger + Secrets func(kind, name string) Secrets + Store Store + func (r *Runner) Run(ctx context.Context, connID, kind string, cfg json.RawMessage, in ActInput) (ActOutput, error) + type SQLStore struct + DB *sql.DB + func (s SQLStore) Claim(ctx context.Context, row OutboxRow) (string, bool, error) + func (s SQLStore) Finish(ctx context.Context, id, status string, out ActOutput, sendErr error) error + type Secrets interface + Reveal func(ctx context.Context, name string) (string, error) + type Static map[string]string + func (s Static) Reveal(_ context.Context, name string) (string, error) + type Store interface + Claim func(ctx context.Context, row OutboxRow) (id string, fresh bool, err error) + Finish func(ctx context.Context, id string, status string, out ActOutput, sendErr error) error + type Text struct + AR string + EN string