Behaviour implemented by ledger backends.
The runtime calls the configured backend (see config :logistiki, :ledger_backend) to execute journals, reverse them, and compute
projections.
Initial backends:
Logistiki.Ledger.Simulation— fast, deterministic, no external depsLogistiki.Ledger.Beancount— the accounting oracle viabeancount_ex
Backends must not leak their own types into the public API. Results are
returned as Logistiki.Projections.* structs.
Summary
Callbacks
@callback balance(account :: term(), opts :: keyword()) :: {:ok, Logistiki.Projections.Balance.t()} | {:error, term()}
@callback execute_journal(journal :: Logistiki.Accounting.Journal.t(), opts :: keyword()) :: {:ok, Logistiki.Ledger.Result.t()} | {:error, term()}
@callback reverse_journal( journal :: Logistiki.Accounting.Journal.t(), attrs :: map(), opts :: keyword() ) :: {:ok, Logistiki.Ledger.Result.t()} | {:error, term()}
@callback statement(account :: term(), opts :: keyword()) :: {:ok, [Logistiki.Projections.StatementLine.t()]} | {:error, term()}
@callback trial_balance(opts :: keyword()) :: {:ok, Logistiki.Projections.TrialBalance.t()} | {:error, term()}