What an analysis step (Storehouse.Analyzer) made of a file, kept in the
file's :analysis, by the step's name:
:status-:ok,:skipped(the step does not apply to the file) or:failed.:result- what the step read, a map JSON holds (Storehouse.Metadata), as the step gave it:%{}unless:ok.:error- why it failed, ornil.:at- when it ran, aDateTime.
The step's result is never mixed with Storehouse's own keys: a step may
give %{"error" => …} of its own, and it is a result like any other.
Summary
Types
@type status() :: :ok | :skipped | :failed
@type t() :: %Storehouse.Analysis{ at: DateTime.t(), error: String.t() | nil, result: map(), status: status() }
Functions
The analysis of a map to_map/1 gave, or nil for one it did not.
The analysis as a map with string keys, for JSON and a record's column.
Examples
iex> analysis = %Storehouse.Analysis{status: :ok, result: %{"pages" => 12}, at: ~U[2026-10-23 08:00:00Z]}
iex> Storehouse.Analysis.to_map(analysis)
%{"status" => "ok", "result" => %{"pages" => 12}, "error" => nil, "at" => "2026-10-23T08:00:00Z"}