Threadline.Capture.TriggerCaptureConfig (Threadline v0.5.0)

Copy Markdown View Source

Shared loader for config :threadline, :trigger_capture.

The normalized table entries returned here are reused by trigger generation and drift reconciliation so both surfaces share one validated config truth.

Summary

Functions

Loads and normalizes config :threadline, :trigger_capture.

Normalizes the configured :tables map into string-keyed keyword entries.

Types

table_entry()

@type table_entry() :: keyword()

tables_map()

@type tables_map() :: %{optional(String.t()) => table_entry()}

Functions

load(raw_config \\ Application.get_env(:threadline, :trigger_capture))

@spec load(nil | keyword() | map()) :: tables_map()

Loads and normalizes config :threadline, :trigger_capture.

Accepts an explicit config value for tests; otherwise reads from application env. Every table entry is re-validated through Threadline.Capture.RedactionPolicy.validate!/1.

normalize_tables_map(map)

@spec normalize_tables_map(map()) :: tables_map()

Normalizes the configured :tables map into string-keyed keyword entries.