API Reference double_entry_ledger v#0.3.0

View Source

Modules

Manages financial accounts in the Double Entry Ledger system.

Public boundary for submitting ledger commands.

Represents account balance components in the Double Entry Ledger system.

Tracks historical balance states for accounts in the Double Entry Ledger system.

The DoubleEntryLedger.BaseSchema module provides a base schema configuration for all schemas in the DoubleEntryLedger project.

Defines and manages commands in the Double Entry Ledger system.

CommandMap implementation for account-related operations in the Double Entry Ledger system.

Schema for account data payload embedded in commands.

This is an Ecto.ParameterizedType

Represents individual transaction entry data for the Double Entry Ledger system.

Provides error tracking and management for command processing in the Double Entry Ledger system.

Defines the TransactionCommandMap schema for representing transaction command data in the Double Entry Ledger system.

Provides the TransactionData embedded schema for the Double Entry Ledger system.

Provides functions to extract and manipulate error information from Ecto changesets.

Monitors the command queue for pending commands and ensures processors are started as needed.

Handles processing of commands for a specific instance.

Provides scheduling helpers for commands in the command queue.

Supervises the command queue system components.

Schema for the command queue table, used for worker-based queue management. This schema tracks commands that need to be processed by workers.

Defines and manages individual financial entries in the Double Entry Ledger system. Entries should always be created or updated through an Command to ensure proper handling of balance updates and history creation.

Protocol defining helper functions for working with entry data in the Double Entry Ledger system.

Defines and manages ledger instances in the Double Entry Ledger system.

Defines and manages JournalEvents in the Double Entry Ledger system.

Schema for linking events and accounts.

Join schema linking events and transactions in the Double Entry Ledger.

Join schema linking events and transactions in the Double Entry Ledger.

Bespoke logger

Migrations for the DoubleEntryLedger package.

Provides helper functions for managing Optimistic Concurrency Control (OCC) in the Double Entry Ledger system.

Protocol for handling Optimistic Concurrency Control (OCC) in the double-entry ledger system.

Behavior and default implementation for Optimistic Concurrency Control (OCC) in command processing.

Lightweight correlation row keyed by external idempotency tuple. Creates transaction keys for andy new pending transaction to make it easier to find updates

Defines the behaviour for the DoubleEntryLedger Repo. This module should be used in the test environment to ensure that the Repo module implements the required functions.

Provides functions for managing and querying accounts in the double-entry ledger system.

Helper functions for building Account changesets in the Double Entry Ledger system.

Provides functions for managing commands in the double-entry ledger system.

Helper functions for command processing in the Double Entry Ledger system.

Provides functions for managing ledger instances in the double-entry ledger system.

Helper functions for Instance store queries

Provides functions for managing events in the double-entry ledger system.

Helper functions for journal event queries in the Double Entry Ledger system.

Provides functions for managing transactions in the double-entry ledger system.

Provides helper functions for building Ecto.Multi operations related to transactions in the double-entry ledger system.

Telemetry events emitted by DoubleEntryLedger.

Defines the transaction schema for the double-entry ledger system.

Defines the type specifications and constants for the DoubleEntryLedger system.

Changeset helpers for error formatting and custom validations.

Provides types and helper functions for currency handling within the ledger system.

Provides helper functions for working with maps in the context of the double-entry ledger.

Builds structured metadata maps for logging and tracing ledger operations.

Main command processing orchestrator for the Double Entry Ledger system.

Response handler for account-related event processing operations.

Response handler for account-related event processing operations.

Processes AccountCommandMap for creating new accounts in the double-entry ledger system.

Handles the processing of creation events in the double-entry ledger system.

Processes TransactionCommandMap structures for atomic creation and update of events and their associated transactions in the Double Entry Ledger system.

Processes command maps for creating transactions, returning changesets on error instead of raising or saving invalid data.

Specialized error handling for the event processing pipeline in the double-entry ledger system.

Specialized error handling for the event processing pipeline in the double-entry ledger system.

Transforms accounting events into ledger operations in the double-entry bookkeeping system.

Processes AccountCommandMap structures for atomic update of events and their associated accounts.

Custom exception for handling errors when update commands can't be processed due to issues with their corresponding create commands.

Processes update (transaction) events in the double-entry ledger system.

Processes TransactionCommandMap structures for atomic update of events and their associated transactions in the Double Entry Ledger system.

Processes TransactionCommandMap structures for atomic update of commands and their associated transactions in the Double Entry Ledger system, without saving on error.

Behaviour for command worker implementations.

Oban worker to create all JournalEventLinks

Mix Tasks

Generates a migration file for the DoubleEntryLedger package.

Mix task for running performance load tests on the Double Entry Ledger system.