MCPcopy Create free account

hub / github.com/devaccuracy/ledgerforge / functions

Functions1,908 in github.com/devaccuracy/ledgerforge

↓ 1 callersMethodGetAPIKey
Creates a new API key
database/repository.go:175
↓ 1 callersMethodGetAccount
GetAccount retrieves an account by its ID. It fetches the account from the datasource and includes additional data as specified. Parameters: - id str
account.go:165
↓ 1 callersMethodGetAccountByID
Creates a new account
database/repository.go:116
↓ 1 callersMethodGetAccountByNumber
Retrieves all accounts (legacy)
database/repository.go:118
↓ 1 callersMethodGetAllAccounts
GetAllAccounts retrieves all accounts from the database. Returns: - []model.Account: A slice of Account models. - error: An error if the accounts cou
account.go:186
↓ 1 callersMethodGetAllAccountsWithFilterAndOptions
GetAllAccountsWithFilterAndOptions retrieves accounts with filtering, sorting, and optional count. It uses the filter package to build SQL WHERE and O
database/account.go:398
↓ 1 callersMethodGetAllBalancesWithFilterAndOptions
GetAllBalancesWithFilterAndOptions retrieves balances with filtering, sorting, and optional count. It uses the filter package to build SQL WHERE and O
database/balance.go:1757
↓ 1 callersMethodGetAllIdentities
GetAllIdentities retrieves all identities from the database. Returns: - []model.Identity: A slice of Identity models. - error: An error if the identi
identity.go:85
↓ 1 callersMethodGetAllIdentitiesWithFilterAndOptions
GetAllIdentitiesWithFilterAndOptions retrieves identities with filtering, sorting, and optional count. It uses the filter package to build SQL WHERE a
database/identity.go:388
↓ 1 callersMethodGetAllLedgers
GetAllLedgers retrieves all ledgers from the datasource. It returns a slice of Ledger models and an error if the operation fails. Returns: - []model.
ledger.go:75
↓ 1 callersMethodGetAllLedgersWithFilterAndOptions
GetAllLedgersWithFilterAndOptions retrieves ledgers with filtering, sorting, and optional count. It uses the filter package to build SQL WHERE and ORD
database/ledger.go:242
↓ 1 callersMethodGetAllMonitors
GetAllMonitors retrieves all balance monitors. It starts a tracing span, fetches all monitors, and records relevant events. Parameters: - ctx context
balance.go:393
↓ 1 callersMethodGetBalanceByIndicator
GetBalanceByIndicator retrieves a balance by its indicator and currency. It starts a tracing span, fetches the balance, and records relevant events.
balance.go:616
↓ 1 callersMethodGetBalanceMonitors
GetBalanceMonitors retrieves all monitors for a given balance ID. It starts a tracing span, fetches the monitors, and records relevant events. Parame
balance.go:416
↓ 1 callersMethodGetEffectiveDate
GetEffectiveDate returns the transaction's effective date, falling back to CreatedAt if not explicitly set.
model/transaction.go:130
↓ 1 callersMethodGetExistingTransactionReferences
Checks if a transaction exists by reference
database/repository.go:53
↓ 1 callersMethodGetExistingTransactionReferences
GetExistingTransactionReferences retrieves the subset of the provided references that already exist in the database. It returns an empty set when the
database/transaction.go:508
↓ 1 callersMethodGetExternalTransactionsPaginated
Retrieves matches by reconciliation ID
database/repository.go:159
↓ 1 callersMethodGetHook
(ctx context.Context, hookID string)
internal/hooks/types.go:69
↓ 1 callersMethodGetIdentity
GetIdentity retrieves an identity record by its ID. It extracts the ID from the route parameters and fetches the identity record. If the ID is missing
api/identity.go:66
↓ 1 callersMethodGetInflightTransactionsByParentID
Retrieves transactions in a paginated manner
database/repository.go:58
↓ 1 callersMethodGetLineageMappingByProvider
Retrieves all lineage mappings for a balance
database/repository.go:185
↓ 1 callersMethodGetMatchingRule
Retrieves all matching rules
database/repository.go:163
↓ 1 callersMethodGetMatchingRules
Records a matching rule
database/repository.go:162
↓ 1 callersMethodGetMonitorByID
GetMonitorByID retrieves a balance monitor by its ID. It starts a tracing span, fetches the monitor, and records relevant events. Parameters: - ctx c
balance.go:371
↓ 1 callersMethodGetQueuedTransactionsForCoalescing
Retrieves stuck QUEUED transactions with no child
database/repository.go:71
↓ 1 callersMethodGetQueuedTransactionsForDestinationCoalescing
(ctx context.Context, destination, currency, excludeTransactionID string, createdAtOrAfter time.Time, limit in
database/repository.go:73
↓ 1 callersMethodGetQueuedTransactionsForSourceCoalescing
(ctx context.Context, source, currency, excludeTransactionID string, createdAtOrAfter time.Time, limit int)
database/repository.go:72
↓ 1 callersMethodGetRefundableTransactionsByParentID
Retrieves inflight transactions by parent ID
database/repository.go:59
↓ 1 callersMethodGetSearchClient
()
ledgerforge.go:193
↓ 1 callersFunctionGetSortableFieldsForTable
GetSortableFieldsForTable returns fields that can be sorted. All filterable fields are sortable. For optimal performance on large datasets, consider a
internal/filter/validation.go:159
↓ 1 callersMethodGetStuckQueuedTransactions
Retrieves shadow transactions by parent transaction ID
database/repository.go:70
↓ 1 callersMethodGetTotalCommittedTransactions
Retrieves all transactions
database/repository.go:56
↓ 1 callersMethodGetTransactionsByCriteria
Checks if a transaction has already been refunded
database/repository.go:68
↓ 1 callersMethodGetTransactionsPaginated
Gets the total count of committed transactions for a parent
database/repository.go:57
↓ 1 callersMethodGroupTransactions
Retrieves refundable transactions by parent ID
database/repository.go:60
↓ 1 callersMethodHandleBatchNotification
HandleBatchNotification processes a batch of items and indexes them in dependency order. It first indexes all dependencies (e.g., balances), then inde
internal/search/search.go:252
↓ 1 callersMethodHasPendingCreditOutbox
Gets outbox entry by transaction ID
database/repository.go:195
↓ 1 callersFunctionInit
Init creates all metric instruments. It should be called once during application startup. Safe to call even when observability is disabled
internal/metrics/metrics.go:67
↓ 1 callersMethodInsertLineageOutbox
Inserts outbox entry within a transaction
database/repository.go:190
↓ 1 callersMethodInsertLineageOutboxInTx
InsertLineageOutboxInTx inserts a lineage outbox entry within an existing database transaction. This ensures the outbox entry is committed atomically
database/lineage.go:145
↓ 1 callersMethodIsParentTransactionVoid
Retrieves a transaction by ID
database/repository.go:50
↓ 1 callersMethodIsTransactionRefunded
Retrieves transactions by parent ID with pagination
database/repository.go:67
↓ 1 callersFunctionIsValidLogicalOperator
(op LogicalOperator)
internal/filter/operators.go:47
↓ 1 callersMethodLoadReconciliationProgress
Saves reconciliation progress
database/repository.go:167
↓ 1 callersFunctionLooksLikeCSV
(data []byte)
internal/files/files.go:203
↓ 1 callersFunctionMapErrorToHTTPStatus
MapErrorToHTTPStatus maps APIError codes to appropriate HTTP status codes. It returns the corresponding HTTP status code for the given APIError.
internal/apierror/apierror.go:66
↓ 1 callersMethodMarkOutboxCompleted
Claims pending entries for processing
database/repository.go:192
↓ 1 callersMethodMarkOutboxFailed
Marks an outbox entry as completed
database/repository.go:193
↓ 1 callersFunctionMetricsAuth
MetricsAuth returns a middleware that controls access to the /metrics endpoint. Behavior based on secure mode and token configuration: - Secure mode
api/middleware/middleware.go:80
↓ 1 callersFunctionMetricsAuthHandler
MetricsAuthHandler wraps an http.Handler with bearer token authentication. This is the non-Gin equivalent of MetricsAuth, used for the worker monitori
api/middleware/middleware.go:120
↓ 1 callersMethodMigrateTypeSenseSchema
MigrateTypeSenseSchema adds new fields and removes old fields from the existing collection schema in Typesense. This is useful when the schema has bee
internal/search/search.go:440
↓ 1 callersFunctionNewBalanceTracker
NewBalanceTracker creates a new BalanceTracker instance. It initializes the Balances and Frequencies maps. Returns: - *model.BalanceTracker: A pointe
balance.go:47
↓ 1 callersFunctionNewCLI
NewCLI creates the command-line interface (CLI) for the LedgerForge application. It sets up the root command and subcommands like serverCommands, work
cmd/main.go:103
↓ 1 callersFunctionNewHookManager
NewHookManager creates a new Redis-based hook manager. It initializes the hook manager with the provided Redis client and Asynq client. Parameters: -
internal/hooks/manager.go:54
↓ 1 callersFunctionPairKeyForTransaction
(manager *Manager, txn *model.Transaction)
internal/hotpairs/router.go:119
↓ 1 callersFunctionParseDateTime
(value string)
internal/filter/datetime.go:9
↓ 1 callersFunctionPrecisionBankersRound
PrecisionBankersRound applies banker's rounding (round half to even) at the given precision scale factor.
model/transaction.go:106
↓ 1 callersFunctionProcessCSV
ProcessCSV now uses parallel processing with workers
internal/files/files.go:229
↓ 1 callersFunctionProcessJSON
ProcessJSON now uses batch processing
internal/files/files.go:460
↓ 1 callersMethodProcessQueuedTransaction
ProcessQueuedTransaction preserves the existing queued-worker behavior while routing the decision through the shared internal transaction executor.
transaction.go:755
↓ 1 callersMethodQueueInflightExpiry
QueueInflightExpiry handles queuing a transaction for inflight expiration. This method is separate from the main Enqueue to ensure expiration is handl
queue.go:208
↓ 1 callersMethodRecordExternalTransaction
Retrieves external transactions in a paginated manner
database/repository.go:160
↓ 1 callersMethodRecordMatches
Loads reconciliation progress
database/repository.go:168
↓ 1 callersMethodRecordMatchingRule
Records an external transaction
database/repository.go:161
↓ 1 callersMethodRecordTransactionWithBalancesAndOutbox
Records a transaction with balance updates atomically
database/repository.go:46
↓ 1 callersMethodRecordTransactionsWithBalanceSetAndOutboxes
(ctx context.Context, txns []*model.Transaction, balances []*model.Balance, outboxes []*model.LineageOutbox)
database/repository.go:48
↓ 1 callersMethodRecordTransactionsWithBalancesAndOutboxes
RecordTransactionsWithBalancesAndOutboxes atomically records multiple transactions, updates the source and destination balances once, and inserts any
database/transaction.go:327
↓ 1 callersMethodRecordUnmatched
Records matches for a reconciliation
database/repository.go:169
↓ 1 callersMethodRegisterHook
(ctx context.Context, hook *Hook)
internal/hooks/types.go:66
↓ 1 callersFunctionResolveSortField
ResolveSortField maps a requested sort field to a safe column name. It returns only string literals from a switch; user input selects which constant t
internal/filter/sql_builder.go:245
↓ 1 callersMethodSaveReconciliationProgress
Deletes a matching rule
database/repository.go:166
↓ 1 callersFunctionSecurityHeaders
SecurityHeaders sets security headers to the response. It sets the following headers: - X-Content-Type-Options: nosniff - X-Frame-Options: DENY - Refe
api/middleware/middleware.go:167
↓ 1 callersFunctionSlackNotification
SlackNotification sends an error message to a Slack webhook. It formats the error details and the current time into a Slack message payload. Paramete
internal/notification/notification.go:39
↓ 1 callersMethodStart
Start begins the background recovery loop for stuck queued transactions.
queue_recovery.go:61
↓ 1 callersMethodStartInstantReconciliation
StartInstantReconciliation initiates a reconciliation process directly with provided transactions instead of loading them from an uploaded file. Param
reconciliation.go:194
↓ 1 callersMethodToJSON
ToJSON serializes the transaction to JSON bytes.
model/transaction.go:92
↓ 1 callersMethodTokenizeAllPII
TokenizeAllPII tokenizes all eligible PII fields in an identity. Parameters: - identityID string: The ID of the identity. Returns: - error: An error
identity.go:321
↓ 1 callersMethodTokenizeIdentity
TokenizeIdentity tokenizes all specified fields in an identity. Parameters: - identityID string: The ID of the identity. - fields []string: The names
identity.go:268
↓ 1 callersMethodTransactionExistsByIDOrParentID
(ctx context.Context, id string)
database/repository.go:65
↓ 1 callersFunctionTryReindexIfNeeded
(ctx context.Context, client *TypesenseClient, ds database.IDataSource)
internal/search/reindex.go:485
↓ 1 callersMethodUpdateBalance
Retrieves all balances (legacy)
database/repository.go:100
↓ 1 callersMethodUpdateBalanceMetadata
(ctx context.Context, id string, metadata map[string]interface{})
database/repository.go:63
↓ 1 callersMethodUpdateBalanceMetadata
UpdateBalanceMetadata updates the metadata for a specific balance in the database. It marshals the metadata map to JSON before storing it. Parameters
database/metadata.go:68
↓ 1 callersMethodUpdateBalances
Retrieves a balance by indicator and currency
database/repository.go:102
↓ 1 callersMethodUpdateHook
(ctx context.Context, hookID string, hook *Hook)
internal/hooks/types.go:67
↓ 1 callersMethodUpdateIdentityMetadata
(id string, metadata map[string]interface{})
database/repository.go:64
↓ 1 callersMethodUpdateIdentityMetadata
UpdateIdentityMetadata updates the metadata for a specific identity in the database. It marshals the metadata map to JSON before storing it. Paramete
database/metadata.go:91
↓ 1 callersMethodUpdateLedgerMetadata
Groups transactions based on specified criteria
database/repository.go:61
↓ 1 callersMethodUpdateMonitor
UpdateMonitor updates an existing balance monitor. It starts a tracing span, updates the monitor, and records relevant events and errors. Parameters:
balance.go:438
↓ 1 callersMethodUpdateTransactionMetadata
UpdateTransactionMetadata updates the metadata for a specific transaction in the database. It merges the provided metadata with existing metadata for
database/metadata.go:43
↓ 1 callersMethodUpdateTransactionStatus
Gets existing transaction references in bulk
database/repository.go:54
↓ 1 callersFunctionUploadExternalData
UploadExternalData handles the process of uploading external data by detecting file type, parsing, and storing it. Parameters: - ctx: The context for
internal/files/files.go:64
↓ 1 callersMethodWithBatchSize
WithBatchSize sets the batch size for processing outbox entries. Parameters: - size int: The number of entries to process per batch. Returns: - *Lin
lineage_worker.go:67
↓ 1 callersMethodWithLockDuration
WithLockDuration sets the lock duration for claimed entries. Parameters: - duration time.Duration: The lock duration. Returns: - *LineageOutboxProce
lineage_worker.go:91
↓ 1 callersMethodacquireBalanceSetLock
(ctx context.Context, balanceIDs []string)
transaction.go:1430
↓ 1 callersMethodacquireLock
acquireLock acquires distributed locks for a transaction to ensure exclusive access to both source and destination balances. It uses a MultiLocker wit
transaction.go:269
↓ 1 callersFunctionadjustPercentageAmounts
adjustPercentageAmounts adjusts percentage amounts to maintain the correct total
model/transaction.go:234
↓ 1 callersMethodapplyAccountName
applyAccountName applies a name to the given account based on its identity. If the account name is empty, it fetches the identity and sets the account
account.go:83
↓ 1 callersFunctionapplyExternalAccount
applyExternalAccount applies external account details to the given account. It fetches the configuration, checks if auto-generation is enabled, and ma
account.go:40
← previousnext →601–700 of 1,908, ranked by callers