API Reference Threadline v#0.2.0

Copy Markdown View Source

Modules

Audit platform for Elixir teams using Phoenix, Ecto, and PostgreSQL.

Ecto schema for the audit_changes table.

Ecto schema for the audit_transactions table.

SQL DDL for the Threadline audit schema.

Validates trigger redaction options at codegen time (Mix / TriggerSQL).

Generates PL/pgSQL trigger DDL for Threadline audit capture.

Brownfield cutover helpers for honest T₀ semantics with Threadline capture.

CSV and JSON export for audited row changes.

Health checks for Threadline infrastructure.

Helpers for propagating audit context through background job args maps.

Plug that extracts AuditContext from a Plug.Conn and stores it in conn.assigns[:audit_context].

Ecto query implementations for the Threadline public API.

Batched retention purge for audit_changes and empty audit_transactions.

Validates config :threadline, :retention before purge runs.

Value object representing the actor who performed an audited operation.

Ecto schema for the audit_actions table.

Execution context for an audited request or job.

DDL helpers for the Threadline semantics schema (Phase 2).

Telemetry integration helpers for Threadline.

Pure policy for comparing Threadline.Health.trigger_coverage/1 output with host-configured expected audited table names.

Mix Tasks

Brownfield capture cutover helper — honest T0 semantics (see guides/brownfield-continuity.md).

Loads application config, starts the configured Ecto repo, and writes an export file using Threadline.Export — no ad-hoc Ecto.Query in this task (parity with mix threadline.retention.purge).

Generates an Ecto migration that installs Threadline audit triggers on the specified tables.

Generates an Ecto migration file for the Threadline audit schema.

Delegates to Threadline.Retention.purge/1 after loading application config and starting the configured Ecto repo (same resolution pattern as mix threadline.verify_coverage).

Verifies that tables listed in application config have Threadline audit triggers installed, using the same catalog queries as Threadline.Health.trigger_coverage/1.