MCPcopy Create free account

hub / github.com/devaccuracy/ledgerforge / functions

Functions1,908 in github.com/devaccuracy/ledgerforge

↓ 4 callersMethodacquireTransactionLocker
(ctx context.Context, locker *redlock.MultiLocker)
transaction.go:1446
↓ 4 callersMethodactivityKey
(pairKey string)
internal/hotpairs/hotpairs.go:184
↓ 4 callersFunctionapplyTransaction
applyTransaction applies a single transaction to update balance totals
database/balance.go:1518
↓ 4 callersFunctionclamp_01
(value: float | None)
tests/loadtest/tools/dashboard_parser.py:459
↓ 4 callersFunctioncomputeTimestampRange
(ts TimestampValue)
internal/filter/datetime.go:95
↓ 4 callersMethodconvertNumberField
convertNumberField converts a single numeric field to string format
internal/search/search.go:330
↓ 4 callersFunctionconvertToStructFieldName
convertToStructFieldName ensures consistent field name format by returning the Go struct field name (typically capitalized) for the given input
identity.go:386
↓ 4 callersFunctionfindLargestDecimal
findLargestDecimal finds the key with the largest decimal value
model/transaction.go:259
↓ 4 callersFunctionformatTpm
(value)
tests/loadtest/tools/dashboard/app.js:1413
↓ 4 callersFunctiongetBalanceMock
(credit, debit, balance *big.Int, indicator string)
balance_test.go:52
↓ 4 callersMethodgetMostRecentSnapshot
getMostRecentSnapshot finds the most recent balance snapshot before the target time
database/balance.go:1447
↓ 4 callersFunctionhandleZeroAmount
handleZeroAmount returns zero amounts for all distributions when total is zero
model/transaction.go:385
↓ 4 callersFunctionisDrained
(s snapshot)
tests/loadtest/tools/queue_benchmark.go:339
↓ 4 callersFunctionmergeMetadata
mergeMetadata merges new metadata with existing metadata. If the current metadata is nil, it initializes a new map. Parameters: - current: The existi
metadata.go:185
↓ 4 callersFunctionnewTestRedisConfig
(t *testing.T)
internal/cache/cache_test.go:29
↓ 4 callersMethodoneToManyReconciliation
oneToManyReconciliation performs a one-to-many reconciliation, where each external transaction can match multiple internal transactions grouped by spe
reconciliation.go:681
↓ 4 callersFunctionparseValue
(value string)
internal/filter/values.go:7
↓ 4 callersFunctionpercentile
(values []float64, pct float64)
tests/loadtest/tools/queue_benchmark.go:612
↓ 4 callersMethodplanTransactionExecution
planTransactionExecution selects the internal execution mode for a transaction based on whether queued batching is allowed and whether hot-lane execut
transaction.go:661
↓ 4 callersFunctionpollForTransactionFundAllocation
pollForTransactionFundAllocation polls until the transaction has fund allocation metadata populated
lineage_integration_test.go:128
↓ 4 callersFunctionprocessHTTP
processHTTP sends a webhook notification via HTTP POST request. Parameters: - data NewWebhook: The webhook notification data to send. - client *http.
webhooks.go:75
↓ 4 callersMethodprocessMetadata
processMetadata handles metadata field normalization for object schemas
internal/search/search.go:303
↓ 4 callersMethodprocessStuckTransaction
processStuckTransaction replays one stuck queued transaction, preserving the existing recovery attempt tracking and rejection semantics while preferri
queue_recovery.go:162
↓ 4 callersMethodreleaseLock
releaseLock releases the distributed locks acquired for a transaction. It starts a tracing span, attempts to release all locks, and records relevant e
transaction.go:1642
↓ 4 callersFunctionshouldRejectLockContentionImmediately
(cfg *config.Configuration, err error)
cmd/workers.go:180
↓ 4 callersMethodvalidateTxn
validateTxn validates a transaction by checking if its reference has already been used. It starts a tracing span, checks the existence of the transact
transaction.go:381
↓ 4 callersFunctionwriteCurrentSummary
(cfg benchmarkConfig, start, end snapshot, samples []snapshot)
tests/loadtest/tools/queue_benchmark.go:523
↓ 3 callersFunctionBuildOrderBy
BuildOrderBy constructs an ORDER BY clause using only safe, constant column names.
internal/filter/sql_builder.go:464
↓ 3 callersMethodClose
Close properly closes all connections and resources used by the LedgerForge instance.
ledgerforge.go:173
↓ 3 callersMethodCommitInflightTransactionWithQueue
(ctx context.Context, transactionID string, amount *big.Int)
inflight_transaction.go:218
↓ 3 callersFunctionConnectDB
ConnectDB establishes a database connection with pooling.
database/db.go:90
↓ 3 callersFunctionConnectDB
ConnectDB establishes a database connection with pooling. It retries the initial ping up to maxConnRetries times with exponential backoff to handle tr
internal/pg-conn/pg_conn.go:20
↓ 3 callersMethodCreateAccount
(account model.Account)
database/repository.go:115
↓ 3 callersMethodCreateBalance
CreateBalance creates a new balance. It starts a tracing span, creates the balance, and performs post-creation actions. Parameters: - ctx context.Con
balance.go:231
↓ 3 callersMethodCreateLedger
CreateLedger inserts a new ledger record into the database, ensuring metadata is properly marshaled into JSON format. It assigns a unique ledger ID wi
database/ledger.go:41
↓ 3 callersMethodCreateMonitor
CreateMonitor creates a new BalanceMonitor record in the database. This function generates a unique MonitorID for the monitor, sets the creation times
database/balance.go:1128
↓ 3 callersMethodDeduplicate
Deduplicate removes duplicate dependencies based on collection and document ID.
internal/search/search.go:146
↓ 3 callersMethodDeleteIdentity
DeleteIdentity deletes a specific identity record from the database. It executes the SQL delete query based on the provided identity ID. Parameters: -
database/identity.go:279
↓ 3 callersMethodDetokenizeIdentityField
DetokenizeIdentityField detokenizes a specific field in an identity. Parameters: - identityID string: The ID of the identity. - fieldName string: The
identity.go:217
↓ 3 callersMethodFetchAndGroupExternalTransactions
FetchAndGroupExternalTransactions retrieves external transactions from the database based on a specific grouping criterion and paginates the results.
database/reconciliation.go:734
↓ 3 callersFunctionGenerateKey
GenerateKey creates a new secure API key
model/api_key.go:23
↓ 3 callersMethodGetAPIKey
GetAPIKey retrieves an API key from the database using its key string. The provided key's prefix is used for efficient lookup, then bcrypt verifies th
database/api_key.go:124
↓ 3 callersMethodGetAPIKeyByKey
GetAPIKeyByKey retrieves an API key by its key string Parameters: - ctx: The context for the operation - key: The API key string Returns: - *model.A
apikey.go:61
↓ 3 callersMethodGetAllAccounts
GetAllAccounts retrieves all accounts from the database. It returns a list of Account objects, each populated with metadata and account details. Retur
database/account.go:252
↓ 3 callersMethodGetAllBalances
GetAllBalances retrieves a limited set of balances from the database, up to 20 records. It processes each balance by scanning the query result, conver
database/balance.go:667
↓ 3 callersMethodGetAllIdentities
GetAllIdentities retrieves all identities from the database. It executes a query to fetch all identity records, parses the result into Identity struct
database/identity.go:127
↓ 3 callersMethodGetAllTransactions
GetAllTransactions retrieves all transactions from the datasource. It starts a tracing span, fetches all transactions, and records relevant events and
transaction.go:2146
↓ 3 callersMethodGetAllTransactions
GetAllTransactions retrieves all transactions from the database, ordered by creation date in descending order. It traces the operation using OpenTelem
database/transaction.go:663
↓ 3 callersMethodGetAllTransactionsWithFilterAndOptions
GetAllTransactionsWithFilterAndOptions retrieves transactions with filtering, sorting, and optional count. It uses the filter package to build SQL WHE
database/transaction.go:1751
↓ 3 callersMethodGetBalanceByIDLite
GetBalanceByIDLite retrieves a balance by its unique ID with a lighter set of fields. This version avoids loading additional related data like identit
database/balance.go:367
↓ 3 callersMethodGetBalancesByIDsLite
GetBalancesByIDsLite retrieves multiple balances by their IDs in a single query. Returns a map of balance_id to Balance for easy lookup. Balances that
database/balance.go:465
↓ 3 callersMethodGetDataSource
()
ledgerforge.go:197
↓ 3 callersFunctionGetDefaultSortField
GetDefaultSortField returns the default sort field for a table.
internal/filter/validation.go:182
↓ 3 callersMethodGetExternalTransactionsPaginated
GetExternalTransactionsPaginated retrieves external transactions based on the provided upload ID with pagination. It first checks the cache, and if th
database/reconciliation.go:612
↓ 3 callersMethodGetHook
GetHook retrieves a webhook by its ID. It fetches the hook data from Redis and unmarshals it into a Hook struct. Parameters: - ctx: The context for t
internal/hooks/manager.go:190
↓ 3 callersMethodGetIdentityByID
GetIdentityByID retrieves an identity from the database based on the given identity ID. It starts a transaction, executes a query to fetch the identit
database/identity.go:69
↓ 3 callersMethodGetInflightTransactionsByParentID
GetInflightTransactionsByParentID retrieves all inflight transactions associated with a given parent transaction ID. It supports pagination via batchS
database/transaction.go:1100
↓ 3 callersMethodGetLedgerByID
GetLedgerByID retrieves a ledger by its ID from the datasource. It returns a pointer to the Ledger model and an error if the operation fails. Paramet
ledger.go:121
↓ 3 callersMethodGetLedgerByID
Retrieves all ledgers (legacy)
database/repository.go:85
↓ 3 callersMethodGetLineageMappings
Creates or updates a lineage mapping
database/repository.go:184
↓ 3 callersMethodGetProgress
GetProgress returns the current progress of the reindex operation.
internal/search/reindex.go:70
↓ 3 callersMethodGetReconciliationsByUploadID
GetReconciliationsByUploadID retrieves all reconciliations associated with a specific upload ID, ordered by the start date in descending order. Parame
database/reconciliation.go:133
↓ 3 callersMethodGetRefundableTransactionsByParentID
GetRefundableTransactionsByParentID retrieves refundable transactions by their parent transaction ID. It starts a tracing span, fetches the transactio
transaction.go:459
↓ 3 callersMethodGetRefundableTransactionsByParentID
GetRefundableTransactionsByParentID retrieves transactions associated with a given parent transaction ID that are eligible for refunds. Refundable tra
database/transaction.go:1220
↓ 3 callersMethodGetTotalCommittedTransactions
GetTotalCommittedTransactions calculates the total committed transaction amounts for a given parent transaction. It uses OpenTelemetry for tracing and
database/transaction.go:745
↓ 3 callersMethodGetTransactionByRef
GetTransactionByRef retrieves a transaction from the database using the provided reference. It traces the operation using OpenTelemetry and returns th
database/transaction.go:561
↓ 3 callersMethodGetTransactionsByParent
GetTransactionsByParent retrieves all transactions associated with a given parent transaction ID. It supports pagination via limit and offset paramete
database/transaction.go:1407
↓ 3 callersMethodIsParentTransactionVoid
IsParentTransactionVoid checks if a parent transaction has a status of 'VOID'. It uses OpenTelemetry to trace the operation and returns a boolean indi
database/transaction.go:440
↓ 3 callersMethodIsRunning
IsRunning returns whether the processor is currently running. Returns: - bool: True if the processor is running.
lineage_worker.go:138
↓ 3 callersMethodIsTransactionRefunded
IsTransactionRefunded checks if a transaction has already been refunded by looking for a transaction that has the inverse source/destination and refer
database/transaction.go:1515
↓ 3 callersMethodLoadReconciliationProgress
LoadReconciliationProgress retrieves the progress of a reconciliation process from the database. If the reconciliation progress is not found, it retur
database/reconciliation.go:703
↓ 3 callersFunctionParseRedisURL
parseRedisURL parses a Redis URL into Redis options, handling various URL formats including Azure Redis Cache URLs with special characters in password
internal/redis-db/redisdb.go:45
↓ 3 callersMethodProcessLineageFromOutbox
ProcessLineageFromOutbox processes a lineage outbox entry. This is called by the outbox worker to perform deferred lineage processing. Parameters: -
lineage.go:1463
↓ 3 callersMethodQueueInflightCommit
QueueInflightCommit schedules an automatic commit for an inflight transaction at the specified date. Parameters: - ctx context.Context: The context f
queue.go:339
↓ 3 callersFunctionRateLimitMiddleware
RateLimitMiddleware creates a middleware for rate limiting using Tollbooth. It sets up rate limiting based on the configuration parameters and applies
api/middleware/middleware.go:39
↓ 3 callersMethodRecordTransactionWithBalances
Records a new transaction
database/repository.go:45
↓ 3 callersFunctionResolveLogicalOperator
(s string)
internal/filter/operators.go:36
↓ 3 callersFunctionResolveQueueLane
(ctx context.Context, manager *Manager, counter PairLaneCounter, source, destination, currency string)
internal/hotpairs/router.go:46
↓ 3 callersMethodRevokeAPIKey
Retrieves an API key by its key string
database/repository.go:176
↓ 3 callersMethodRevokeAPIKey
RevokeAPIKey marks an API key as revoked in the database, preventing its future use. The function updates the is_revoked flag to true and sets the rev
database/api_key.go:204
↓ 3 callersMethodSetNormal
(ctx context.Context, pairKey string)
internal/hotpairs/hotpairs.go:163
↓ 3 callersMethodToInternalTransaction
ToInternalTransaction converts an ExternalTransaction to an InternalTransaction. This is useful when reconciling external transactions with internal r
model/model.go:474
↓ 3 callersMethodTransactionExistsByIDOrParentID
TransactionExistsByIDOrParentID checks if a transaction exists either by its direct ID or as a parent transaction ID for other transactions. Parameter
database/transaction.go:1374
↓ 3 callersMethodUnlock
Unlock releases all locks in reverse order of acquisition. Releasing in reverse order is a best practice for multi-lock scenarios. Parameters: - ctx:
internal/lock/lock.go:274
↓ 3 callersMethodUpdateBalance
UpdateBalance updates an existing balance entry in the database. This method takes a balance object and updates the corresponding fields in the databa
database/balance.go:1084
↓ 3 callersMethodUpdateBalanceIdentity
UpdateBalanceIdentity updates the identity_id of a balance entry in the database. Parameters: - balanceID: The unique identifier of the balance whose
database/balance.go:1699
↓ 3 callersMethodUpdateLedger
UpdateLedger updates an existing ledger's name in the database. It validates that the ledger exists and updates only the name field. Parameters: - id
database/ledger.go:179
↓ 3 callersMethodUpdateLedgerMetadata
UpdateLedgerMetadata updates the metadata for a specific ledger in the database. It marshals the metadata map to JSON before storing it. Parameters:
database/metadata.go:17
↓ 3 callersMethodUpdateReconciliationStatus
UpdateReconciliationStatus updates the status, matched transactions, unmatched transactions, and completed_at timestamp of a reconciliation in the dat
database/reconciliation.go:100
↓ 3 callersMethodUpdateTransactionMetadata
(ctx context.Context, id string, metadata map[string]interface{})
database/repository.go:62
↓ 3 callersMethodUpdateTransactionStatus
UpdateTransactionStatus updates the status of a transaction in the database. It traces the operation using OpenTelemetry and returns an error if the u
database/transaction.go:617
↓ 3 callersMethodValidateRecordTransaction
()
api/model/model.go:124
↓ 3 callersMethodbatchReferenceCheckEnabled
()
transaction.go:1559
↓ 3 callersFunctionbuildJSONContext
(body string)
api/filter_helper_test.go:78
↓ 3 callersMethodbuildQueuedCoalescingBatch
(ctx context.Context, transaction *model.Transaction, batchSize int)
transaction.go:1328
↓ 3 callersMethodcalculateBalanceFromTransactions
calculateBalanceFromTransactions applies transactions to calculate the balance at a specific time
database/balance.go:1543
↓ 3 callersFunctioncompareBarChart
(label, leftRun, rightRun, key, formatter)
tests/loadtest/tools/dashboard/app.js:1013
↓ 3 callersFunctioncompareLineChart
({ runs, valueKey, label, formatter, min = null, max = null })
tests/loadtest/tools/dashboard/app.js:940
↓ 3 callersMethodcontentionKey
(pairKey string)
internal/hotpairs/hotpairs.go:188
↓ 3 callersMethodconvertPreciseToFloat
convertPreciseToFloat converts a precise amount (big.Int) to a floating-point representation. Parameters: - preciseAmount *big.Int: The precise amoun
inflight_transaction.go:361
← previousnext →201–300 of 1,908, ranked by callers