MCPcopy Create free account

hub / github.com/devaccuracy/ledgerforge / functions

Functions1,908 in github.com/devaccuracy/ledgerforge

↓ 3 callersFunctionconvertToStringArray
(values []interface{})
internal/filter/helpers.go:17
↓ 3 callersFunctionconvertToStructFieldName
convertToStructFieldName ensures consistent field name format by returning the Go struct field name (typically capitalized) for the given input
model/identity.go:47
↓ 3 callersMethodfetchAndValidateInflightTransaction
fetchAndValidateInflightTransaction fetches and validates an inflight transaction by its ID. It starts a tracing span, attempts to retrieve the transa
inflight_transaction.go:479
↓ 3 callersFunctionfetchTransactions
fetchTransactions retrieves transactions for a balance within a specific time range using effective_date if available, otherwise falling back to creat
database/balance.go:1494
↓ 3 callersFunctionfinalizeRun
(run)
tests/loadtest/tools/dashboard/app.js:524
↓ 3 callersMethodfindMappingByShadowID
findMappingByShadowID finds a lineage mapping by its shadow balance ID. Parameters: - mappings []model.LineageMapping: The lineage mappings to search
lineage.go:1035
↓ 3 callersFunctiongenerateTokenWithFormat
generateTokenWithFormat creates a token that matches the format of the original value.
internal/tokenization/tokenization.go:261
↓ 3 callersMethodgetLineageProvider
getLineageProvider extracts the fund provider from the transaction metadata. Parameters: - txn *model.Transaction: The transaction to extract the pro
lineage.go:177
↓ 3 callersFunctiongetTransactionSchema
getTransactionSchema returns the schema for the "transactions" collection.
internal/search/search.go:575
↓ 3 callersMethodhandleAsyncBulkTransactionFailure
handleAsyncBulkTransactionFailure handles failures in asynchronous processing and builds a detailed error message including rollback status
transaction.go:2488
↓ 3 callersFunctionhasReachedMaxRetryAttempt
(cfg *config.Configuration, retryCount int)
cmd/workers.go:173
↓ 3 callersFunctionhashBalanceID
hashBalanceID returns a consistent hash value for a string balance ID. Parameters: - balanceID string: The balance ID to hash. Returns: - int: The h
queue.go:261
↓ 3 callersMethodisLeftDistribution
isLeftDistribution checks if a distribution is a "left" type
model/transaction.go:138
↓ 3 callersFunctionisStringArray
(values []interface{})
internal/filter/helpers.go:8
↓ 3 callersFunctionlastDefined
(series, key)
tests/loadtest/tools/dashboard/app.js:1341
↓ 3 callersFunctionlast_defined
(series: list[dict[str, Any]], key: str)
tests/loadtest/tools/dashboard_parser.py:444
↓ 3 callersFunctionlineChart
({ series, valueKey, label, formatter, min = null, max = null })
tests/loadtest/tools/dashboard/app.js:894
↓ 3 callersMethodlogRollbackResult
logRollbackResult logs the outcome of a rollback operation
transaction.go:2447
↓ 3 callersMethodmatchesRules
matchesRules checks whether an external transaction matches a group transaction based on specified matching rules. It iterates through the rules and c
reconciliation.go:275
↓ 3 callersMethodmatchesString
matchesString compares the external and internal string values based on the matching criteria. Parameters: - externalValue: The value from the externa
reconciliation.go:1318
↓ 3 callersFunctionnewMeterProvider
newMeterProvider creates a MeterProvider with dual-mode export: - Pull (Prometheus): always active — exposes metrics via /metrics endpoint for scrapin
internal/traces/otel.go:149
↓ 3 callersMethodoneToOneReconciliation
oneToOneReconciliation performs a one-to-one reconciliation, where each external transaction is matched against a single internal transaction. The pro
reconciliation.go:622
↓ 3 callersFunctionpct
(values, p)
tests/loadtest/tools/k6_json_to_tpm.py:58
↓ 3 callersFunctionpendingQueuedTransactionsForPairLane
(ctx context.Context, counter PairLaneCounter, source, destination, currency, lane string)
internal/hotpairs/router.go:181
↓ 3 callersFunctionpercentile
(values: list[float], pct: int)
tests/loadtest/tools/dashboard_parser.py:425
↓ 3 callersMethodqueueShadowWork
queueShadowWork processes shadow commit or void work synchronously first, and queues to outbox for retry only if there are failures. This provides bot
lineage.go:1322
↓ 3 callersMethodreleaseSingleLock
releaseSingleLock releases a single distributed lock. This is used for operations that lock on a single key (e.g., inflight transaction operations).
inflight_transaction.go:156
↓ 3 callersFunctionrenderCompareMode
()
tests/loadtest/tools/dashboard/app.js:220
↓ 3 callersFunctionrestoreTransactionFlagsFromMetadata
(transaction *model.Transaction)
transaction.go:1620
↓ 3 callersFunctionscanQueuedTransactionsForCoalescing
(rows *sql.Rows)
database/transaction.go:2087
↓ 3 callersFunctionselectRun
(runId)
tests/loadtest/tools/dashboard/app.js:130
↓ 3 callersMethodsequentialAllocation
sequentialAllocation allocates funds sequentially from sources (used for FIFO/LIFO). Parameters: - sources []LineageSource: The available fund source
lineage.go:917
↓ 3 callersMethodstandardDetokenize
standardDetokenize handles detokenization of standard tokens
internal/tokenization/tokenization.go:163
↓ 3 callersMethodstateTTL
()
internal/hotpairs/hotpairs.go:192
↓ 3 callersFunctiontrendStats
(values []float64)
tests/loadtest/tools/queue_benchmark.go:562
↓ 3 callersFunctionupdateBalanceSet
(ctx context.Context, tx *sql.Tx, balances []*model.Balance)
database/balance.go:915
↓ 3 callersMethodupdateRecoveryMetadata
updateRecoveryMetadata stores recovery attempt and status information on the stuck parent transaction so later recovery passes can make bounded retry
queue_recovery.go:237
↓ 3 callersMethodvalidate
validate checks if the transaction is valid (e.g., ensuring positive amount).
model/model.go:412
↓ 3 callersFunctionvalidateDateFormat
(format, value string)
api/model/model.go:77
↓ 3 callersMethodvalidateQueuedBatchTransactionReference
(ctx context.Context, transaction *model.Transaction, prefetchedReferences, existingReferences, batchReference
transaction.go:1522
↓ 3 callersFunctionwaitForNextTickOrInterrupt
(ticker *time.Ticker, signalCh <-chan os.Signal)
tests/loadtest/tools/queue_benchmark.go:537
↓ 2 callersMethodActivateHot
(ctx context.Context, pairKey string)
internal/hotpairs/hotpairs.go:144
↓ 2 callersFunctionApplyRate
ApplyRate applies the exchange rate to the precise amount and returns a *big.Int. The rate is applied after precision to maintain accuracy.
model/model.go:390
↓ 2 callersFunctionAssignQueueLane
(ctx context.Context, manager *Manager, counter PairLaneCounter, txn *model.Transaction)
internal/hotpairs/router.go:22
↓ 2 callersMethodAuthenticate
Authenticate returns a middleware function that handles authentication and authorization for all routes. It checks for the X-LedgerForge-Key header an
api/middleware/auth.go:181
↓ 2 callersMethodBackupToS3
BackupToS3 performs a database backup and uploads the resulting file to an S3 bucket. It first calls BackupToDisk to create a local backup, then uploa
internal/pg-backups/pg-backup-drive.go:167
↓ 2 callersFunctionCalculateDistributionsPrecise
CalculateDistributionsPrecise calculates distributions using big.Int for precision
model/transaction.go:327
↓ 2 callersMethodCommitInflightCredit
CommitInflightCredit commits a credit from the inflight balance and adds it to the credit balance.
model/model.go:199
↓ 2 callersMethodCommitInflightDebit
CommitInflightDebit commits a debit from the inflight balance and adds it to the debit balance. This is part of the finalization process for inflight
model/model.go:184
↓ 2 callersMethodCreateAPIKey
CreateAPIKey creates a new API key for the specified owner Parameters: - ctx: The context for the operation - name: Name of the API key - ownerID: ID
apikey.go:22
↓ 2 callersMethodCreateAPIKey
CreateAPIKey creates a new API key with the specified parameters and stores it in the database. The key is hashed using bcrypt before storage for secu
database/api_key.go:65
↓ 2 callersMethodCreateAccount
CreateAccount creates a new account in the database. It overrides the ledger and identity details, applies the account name, and fetches external acco
account.go:137
↓ 2 callersMethodCreateAccount
CreateAccount inserts a new Account into the database. This function handles metadata serialization and database insertion. Parameters: - account: The
database/account.go:40
↓ 2 callersMethodCreateBalance
CreateBalance inserts a new balance record into the `ledgerforge.balances` table in the database. It handles the generation of a unique balance ID, de
database/balance.go:216
↓ 2 callersMethodCreateIdentity
CreateIdentity inserts a new identity record into the database. It generates a unique IdentityID, sets the creation timestamp, and stores the identity
database/identity.go:38
↓ 2 callersMethodDefaultSortOrder
DefaultSortOrder returns desc if empty, otherwise validates and returns the order.
internal/filter/types.go:66
↓ 2 callersMethodDeleteAccount
DeleteAccount deletes a specific account from the database. It removes the account with the given account ID from the accounts table. Parameters: - id
database/account.go:357
↓ 2 callersMethodDeleteIdentity
Updates an identity
database/repository.go:144
↓ 2 callersMethodDeleteMatchingRule
Updates a matching rule
database/repository.go:165
↓ 2 callersMethodDeleteMatchingRule
DeleteMatchingRule deletes a specific matching rule from the database. Parameters: - ctx: Context for managing the request and tracing. - id: The ID o
database/reconciliation.go:535
↓ 2 callersMethodDeleteMonitor
Updates a balance monitor
database/repository.go:134
↓ 2 callersMethodDeleteMonitor
DeleteMonitor deletes a balance monitor from the database by its monitor ID. It removes the monitor from the `ledgerforge.balance_monitors` table. Pa
database/balance.go:1359
↓ 2 callersMethodError
Error implements the error interface for APIError. It returns a formatted string combining the error code and message.
internal/apierror/apierror.go:49
↓ 2 callersMethodExecuteHooks
(ctx context.Context, hooks []*Hook, hookType HookType, transactionID string, data interface{})
internal/hooks/types.go:71
↓ 2 callersMethodExecuteHooks
ExecuteHooks marshals the hook data and queues each active hook for execution. Parameters: - ctx: The context for the operation. - hooks: The list of
internal/hooks/manager.go:287
↓ 2 callersMethodExtendLock
ExtendLock extends the TTL of the lock if the calling instance is the lock holder. This method ensures that the lock is renewed only by the lock holde
internal/lock/lock.go:127
↓ 2 callersMethodGetAccountByID
GetAccountByID retrieves an account by its ID from the database. It uses a transaction to ensure consistency and can include additional related entiti
database/account.go:69
↓ 2 callersMethodGetAccountByNumber
GetAccountByNumber retrieves an account from the database by its account number. Parameters: - id string: The account number of the account to retrie
account.go:177
↓ 2 callersMethodGetAccountByNumber
GetAccountByNumber retrieves an account based on its number. It queries the database for an account with the given number and returns the account deta
database/account.go:298
↓ 2 callersMethodGetAllAccounts
Retrieves an account by ID with additional data
database/repository.go:117
↓ 2 callersMethodGetAllAccountsWithFilter
Deletes an account Advanced filtering methods
database/repository.go:123
↓ 2 callersMethodGetAllAccountsWithFilterAndOptions
Retrieves accounts with advanced filtering
database/repository.go:124
↓ 2 callersMethodGetAllBalances
GetAllBalances retrieves all balances. It starts a tracing span, fetches all balances, and records relevant events. Parameters: - ctx context.Context
balance.go:279
↓ 2 callersMethodGetAllBalancesWithFilter
Updates only the identity_id of a balance Advanced filtering methods
database/repository.go:109
↓ 2 callersMethodGetAllBalancesWithFilterAndOptions
Retrieves balances with advanced filtering
database/repository.go:110
↓ 2 callersMethodGetAllIdentities
Retrieves an identity by ID
database/repository.go:141
↓ 2 callersMethodGetAllIdentitiesPaginated
Retrieves all identities (legacy)
database/repository.go:142
↓ 2 callersMethodGetAllIdentitiesWithFilter
Deletes an identity Advanced filtering methods
database/repository.go:147
↓ 2 callersMethodGetAllIdentitiesWithFilterAndOptions
Retrieves identities with advanced filtering
database/repository.go:148
↓ 2 callersMethodGetAllLedgersWithFilter
Updates a ledger's name Advanced filtering methods
database/repository.go:89
↓ 2 callersMethodGetAllLedgersWithFilterAndOptions
Retrieves ledgers with advanced filtering
database/repository.go:90
↓ 2 callersMethodGetAllMonitors
Retrieves a balance monitor by ID
database/repository.go:131
↓ 2 callersMethodGetAllMonitors
GetAllMonitors retrieves all balance monitors from the database. It queries the `ledgerforge.balance_monitors` table and returns a list of all monitor
database/balance.go:1215
↓ 2 callersMethodGetAllTransactionsWithFilter
Advanced filtering methods
database/repository.go:77
↓ 2 callersMethodGetAllTransactionsWithFilterAndOptions
Retrieves transactions with advanced filtering
database/repository.go:78
↓ 2 callersMethodGetBalanceAtTime
GetBalanceAtTime retrieves a balance's state at a specific point in time. It can either use balance snapshots for efficiency or calculate from all sou
balance.go:564
↓ 2 callersMethodGetBalanceAtTime
Takes balance snapshots
database/repository.go:105
↓ 2 callersMethodGetBalanceByIndicator
GetBalanceByIndicator retrieves a balance from the database using the specified indicator and currency. The function scans the query result into a Bal
database/balance.go:569
↓ 2 callersMethodGetBalanceMonitors
Retrieves all balance monitors
database/repository.go:132
↓ 2 callersMethodGetBalanceMonitors
GetBalanceMonitors retrieves all balance monitors associated with a specific balance ID from the database. It queries the `ledgerforge.balance_monitor
database/balance.go:1268
↓ 2 callersMethodGetBalancesByIDsLite
Retrieves a balance by ID with minimal data
database/repository.go:98
↓ 2 callersMethodGetExternalTransactionsByReconciliationID
GetExternalTransactionsByReconciliationID fetches all external transactions associated with a given reconciliation ID. Parameters: - ctx: Context for
database/reconciliation.go:372
↓ 2 callersMethodGetInflightTransactionsByParentID
GetInflightTransactionsByParentID retrieves inflight transactions by their parent transaction ID. It starts a tracing span, fetches the transactions f
inflight_transaction.go:55
↓ 2 callersMethodGetMatchesByReconciliationID
GetMatchesByReconciliationID retrieves all matches associated with a given reconciliation ID. It joins the matches table with external transactions to
database/reconciliation.go:304
↓ 2 callersMethodGetMatchingRule
GetMatchingRule retrieves a matching rule by its ID. Parameters: - ctx: The context for managing the request. - id: The ID of the matching rule to ret
reconciliation.go:1137
↓ 2 callersMethodGetMatchingRule
GetMatchingRule retrieves a specific matching rule from the database by its rule ID. Parameters: - ctx: Context for managing the request and tracing.
database/reconciliation.go:568
↓ 2 callersMethodGetMatchingRules
GetMatchingRules retrieves all matching rules from the database. Parameters: - ctx: Context for managing the request and tracing. Returns: - A slice o
database/reconciliation.go:443
↓ 2 callersMethodGetMonitorByID
GetMonitorByID retrieves a BalanceMonitor by its unique MonitorID from the database. It queries the `ledgerforge.balance_monitors` table and maps the
database/balance.go:1176
↓ 2 callersMethodGetProgressPtr
GetProgressPtr returns a pointer to the current progress.
internal/search/reindex.go:145
↓ 2 callersMethodGetReconciliation
GetReconciliation retrieves a reconciliation by its ID. Parameters: - ctx: The context controlling the request. - reconciliationID: The ID of the reco
reconciliation.go:258
← previousnext →301–400 of 1,908, ranked by callers