Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/devaccuracy/ledgerforge
/ functions
Functions
1,908 in github.com/devaccuracy/ledgerforge
⨍
Functions
1,908
◇
Types & classes
159
↓ 2 callers
Function
extractKey
extractKey retrieves the authentication key from the X-LedgerForge-Key header. Parameters: - c: The Gin context containing the request headers. Retu
api/middleware/auth.go:285
↓ 2 callers
Function
fetchTransactions
fetchTransactions fetches transactions in batches and sends them to the jobs channel. It starts a tracing span, iterates through the transactions, and
transaction.go:600
↓ 2 callers
Method
finalizeCommitment
finalizeCommitment finalizes the commitment of a transaction by updating its status and generating new identifiers. It starts a tracing span, updates
inflight_transaction.go:378
↓ 2 callers
Function
floatEquals
Helper function for float64 comparisons
model/transaction_test.go:29
↓ 2 callers
Function
floatToBigInt
Helper to convert float64 to *big.Int with precision applied
model/transaction_test.go:48
↓ 2 callers
Function
formatBytes
(value)
tests/loadtest/tools/dashboard/app.js:1449
↓ 2 callers
Function
formatDecimal
(value)
tests/loadtest/tools/dashboard/app.js:1445
↓ 2 callers
Function
formatDelta
(leftValue, rightValue, formatter)
tests/loadtest/tools/dashboard/app.js:1467
↓ 2 callers
Method
formatPreservingDetokenize
formatPreservingDetokenize detokenizes a format-preserving token. Parameters: - token string: The token to detokenize. Returns: - string: The origin
internal/tokenization/tokenization.go:241
↓ 2 callers
Function
formatThresholdValue
(metricName, value)
tests/loadtest/tools/dashboard/app.js:1270
↓ 2 callers
Function
format_bytes
(value: float | None)
tests/loadtest/tools/dashboard_parser.py:512
↓ 2 callers
Function
format_percent
(value: float | None)
tests/loadtest/tools/dashboard_parser.py:494
↓ 2 callers
Function
format_tpm
(value: float | None)
tests/loadtest/tools/dashboard_parser.py:490
↓ 2 callers
Function
getAPIKeyCacheKey
getAPIKeyCacheKey generates a cache key for an API key lookup Uses the hashed key to ensure consistent cache keys
database/api_key.go:47
↓ 2 callers
Function
getDatePrecisionFromTime
(t time.Time)
internal/filter/datetime.go:73
↓ 2 callers
Function
getDefaultValue
getDefaultValue returns the default value for a given field type in Typesense.
internal/search/search.go:507
↓ 2 callers
Function
getEntityTypeFromID
getEntityTypeFromID determines the entity type from the ID prefix. It analyzes the prefix of the provided ID and returns the corresponding entity type
metadata.go:21
↓ 2 callers
Method
getIDField
getIDField returns the primary ID field name for a given table
internal/search/search.go:406
↓ 2 callers
Method
getLineageSources
getLineageSources retrieves the available fund sources from shadow balances for allocation. Uses a single batch query to fetch all shadow balances ins
lineage.go:838
↓ 2 callers
Function
getResourceFromPath
getResourceFromPath determines the resource type from the URL path. Parameters: - path: The URL path to analyze. Returns: - Resource: The determined
api/middleware/auth.go:76
↓ 2 callers
Method
getSourceAndDestination
getSourceAndDestination retrieves the source and destination balances for a transaction. It checks if the source or destination starts with "@", indic
transaction.go:150
↓ 2 callers
Function
handleRecordTransactionValidationError
(c *gin.Context, err error)
api/transactions.go:85
↓ 2 callers
Function
hasWork
(s snapshot)
tests/loadtest/tools/queue_benchmark.go:335
↓ 2 callers
Function
hashAPIKey
hashAPIKey creates a bcrypt hash of the API key for secure storage. bcrypt includes salt and is resistant to brute-force attacks.
database/api_key.go:23
↓ 2 callers
Function
humanKind
(kind)
tests/loadtest/tools/dashboard/app.js:1378
↓ 2 callers
Function
initializeTelemetryAndObservability
Renamed from initializeObservability to better reflect its purpose
cmd/server.go:294
↓ 2 callers
Function
isLetter
(c byte)
internal/filter/sql_json.go:179
↓ 2 callers
Method
isPercentageDistribution
isPercentageDistribution checks if a distribution is a percentage type
model/transaction.go:143
↓ 2 callers
Function
isReferenceAlreadyUsedError
(err error)
queue_recovery.go:250
↓ 2 callers
Method
listHooksForExecution
listHooksForExecution returns the current hook set for the requested type, or nil when hook execution is not configured for the current LedgerForge in
transaction.go:1136
↓ 2 callers
Function
loadConfigFromFile
(file string)
config/config.go:220
↓ 2 callers
Function
loadUploadedFile
(file)
tests/loadtest/tools/dashboard/app.js:273
↓ 2 callers
Method
manyToOneReconciliation
manyToOneReconciliation performs a many-to-one reconciliation, where multiple internal transactions are grouped and matched against a single external
reconciliation.go:722
↓ 2 callers
Function
mean
(values: list[float | None])
tests/loadtest/tools/dashboard_parser.py:452
↓ 2 callers
Function
mean
(values)
tests/loadtest/tools/dashboard/app.js:1351
↓ 2 callers
Function
merge
()
tests/loadtest/script.js:34
↓ 2 callers
Function
mergeByLabel
(leftItems, rightItems, getLabel)
tests/loadtest/tools/dashboard/app.js:1110
↓ 2 callers
Function
parseOTLPEndpoint
parseOTLPEndpoint extracts the host:port from an OTLP endpoint string and determines whether to use an insecure (non-TLS) connection. Handles all comm
internal/traces/otel.go:219
↓ 2 callers
Function
parse_iso
(value: Any)
tests/loadtest/tools/dashboard_parser.py:112
↓ 2 callers
Function
percentile_stats
(values: list[float])
tests/loadtest/tools/dashboard_parser.py:412
↓ 2 callers
Method
postLedgerActions
postLedgerActions performs some actions after a ledger has been created. It sends the newly created ledger to the search index queue, which indexes th
ledger.go:35
↓ 2 callers
Method
postTransactionActions
postTransactionActions performs post-processing actions for a transaction. It starts a tracing span, queues the transaction and balance data for index
transaction.go:333
↓ 2 callers
Method
prepareTransactionForQueue
prepareTransactionForQueue prepares a transaction for queueing by setting status, metadata, and resolving source/destination balances.
transaction.go:1749
↓ 2 callers
Method
processBalances
processBalances processes the source and destination balances by applying the transaction in-memory. It starts a tracing span, applies the transaction
transaction.go:1243
↓ 2 callers
Method
processBulkTransactions
processBulkTransactions prepares and queues all transactions in a batch with the given batch ID
transaction.go:2379
↓ 2 callers
Method
processGroupedTransactions
processGroupedTransactions handles the matching of transactions for both one-to-many and many-to-one reconciliations. It processes each transaction gr
reconciliation.go:828
↓ 2 callers
Method
processQueuedTransaction
processQueuedTransaction routes queued work through the shared executor so the planner can choose between normal queued batching, hot-lane batching, a
transaction.go:723
↓ 2 callers
Method
processReconciliation
processReconciliation manages the full reconciliation process by executing each step: updating the status, fetching rules, processing transactions, an
reconciliation.go:334
↓ 2 callers
Method
processTxns
processTxns handles the processing of transactions based on whether they are split or single. It delegates to the appropriate processing function base
transaction.go:1910
↓ 2 callers
Method
proportionalAllocation
proportionalAllocation allocates funds proportionally across all sources. Parameters: - sources []LineageSource: The available fund sources. - amount
lineage.go:968
↓ 2 callers
Function
recordTransactionInTx
recordTransactionInTx inserts a transaction record within an existing database transaction. This is a helper function used by RecordTransactionWithBal
database/transaction.go:84
↓ 2 callers
Method
recordTransactionSingle
recordTransactionSingle preserves the existing direct transaction-processing semantics by running the single-transaction flow under the balance lock.
transaction.go:783
↓ 2 callers
Method
recoverWithThreshold
recoverWithThreshold loads currently stuck queued transactions and reprocesses them serially.
queue_recovery.go:138
↓ 2 callers
Function
refreshRuns
()
tests/loadtest/tools/dashboard/app.js:94
↓ 2 callers
Method
rollbackBatchTransactions
rollbackBatchTransactions performs a rollback of transactions in a batch Returns the action performed (voided/refunded) and any error that occurred
transaction.go:2404
↓ 2 callers
Method
runTransactionPostCommitWork
runTransactionPostCommitWork executes monitor checks, post-hooks, and post-transaction actions for already-persisted work items outside the locked per
transaction.go:1106
↓ 2 callers
Method
runTransactionPostCommitWorkWithHooks
runTransactionPostCommitWorkWithHooks executes monitor checks, post-hooks, and post-transaction actions for persisted work items, optionally reusing a
transaction.go:1112
↓ 2 callers
Function
safeColumnForTableAndField
safeColumnForTableAndField maps a field name to a safe column name using only string literals. Returns empty string for unknown fields to break the ta
internal/filter/sql_builder.go:259
↓ 2 callers
Method
sendBulkTransactionWebhook
sendBulkTransactionWebhook sends a webhook notification for a bulk transaction result
transaction.go:2459
↓ 2 callers
Method
send_json
(self, payload: object)
tests/loadtest/tools/dashboard.py:65
↓ 2 callers
Method
serve_file
(self, path: Path)
tests/loadtest/tools/dashboard.py:84
↓ 2 callers
Method
setState
(ctx context.Context, pairKey string, state State)
internal/hotpairs/hotpairs.go:176
↓ 2 callers
Function
setTransactionStatus
setTransactionStatus determines and sets the appropriate status for a transaction. It evaluates the transaction's scheduled time and current status to
transaction.go:2010
↓ 2 callers
Function
setupLedgerForge
(t *testing.T)
api/middleware/auth_test.go:18
↓ 2 callers
Function
sleepWithJitter
(ctx context.Context, deadline time.Time)
internal/lock/lock.go:303
↓ 2 callers
Function
sourceOrSourcesValidation
(t *RecordTransaction)
api/model/model.go:47
↓ 2 callers
Function
storeBatch
(ctx context.Context, uploadID string, batch []model.ExternalTransaction, store StoreFunc)
internal/files/files.go:372
↓ 2 callers
Method
storeExternalTransaction
storeExternalTransaction stores an external transaction in the datasource. Parameters: - ctx: The context for controlling execution. - uploadID: The u
reconciliation.go:113
↓ 2 callers
Method
tryRecordQueuedTransactionBatch
tryRecordQueuedTransactionBatch builds and persists a coalesced queued batch when it is safe and useful, otherwise it returns handled=false so callers
transaction.go:865
↓ 2 callers
Method
updateTransactionDetails
updateTransactionDetails updates the details of a transaction, including source and destination balances and status. It starts a tracing span, creates
transaction.go:298
↓ 2 callers
Method
upsertDocument
upsertDocument handles the final upsert operation to Typesense
internal/search/search.go:414
↓ 2 callers
Method
validateAndUpdateAmount
validateAndUpdateAmount validates the amount to be committed for a transaction and updates the transaction's amount. It orchestrates the validation an
inflight_transaction.go:267
↓ 2 callers
Method
validateLineageProvider
validateLineageProvider checks if the specified provider exists on the source balance. If the source tracks fund lineage but doesn't have the specifie
lineage.go:201
↓ 2 callers
Method
validateRule
validateRule validates a matching rule, including checking its basic structure and criteria. Parameters: - rule: The rule to validate. Returns an erro
reconciliation.go:1198
↓ 2 callers
Function
verifyAPIKey
verifyAPIKey compares a plaintext key with a bcrypt hash.
database/api_key.go:32
↓ 2 callers
Method
voidShadowTransactions
voidShadowTransactions voids all inflight shadow transactions for a parent transaction. It attempts to void all shadows and returns an error if any fa
lineage.go:1274
↓ 1 callers
Function
AnalyzeTextContent
(data []byte)
internal/files/files.go:193
↓ 1 callers
Function
ApplyPrecisionWithDBLookup
ApplyPrecisionWithDBLookup attempts to fetch precision from the database and then applies it to the transaction. Falls back to transaction-defined pre
model/model.go:309
↓ 1 callers
Function
BasicAuth
BasicAuth generates a basic HTTP authentication string by encoding the provided username and password. The string is base64-encoded in the format "use
internal/request/request.go:85
↓ 1 callers
Function
BuildScope
BuildScope creates a scope string from resource and action
api/middleware/scope.go:63
↓ 1 callers
Method
ClaimPendingOutboxEntries
Inserts outbox entry directly (for shadow work)
database/repository.go:191
↓ 1 callers
Method
CommitWorker
CommitWorker processes commit transactions from the jobs channel and sends the results to the results channel. It starts a tracing span, processes eac
inflight_transaction.go:95
↓ 1 callers
Method
CountQueuedTransactionsForPairLane
(ctx context.Context, source, destination, currency, lane string)
internal/hotpairs/router.go:19
↓ 1 callers
Method
CreateCollection
CreateCollection creates a collection in Typesense based on the provided schema. If the collection already exists, it will return without error.
internal/search/search.go:203
↓ 1 callers
Method
CreateIdentity
CreateIdentity creates a new identity in the database. Parameters: - identity model.Identity: The Identity model to be created. Returns: - model.Ide
identity.go:59
↓ 1 callers
Method
CreateLedger
CreateLedger creates a new ledger. It calls postLedgerActions after a successful creation. Parameters: - ledger: A Ledger model representing the ledg
ledger.go:60
↓ 1 callers
Method
CreateMonitor
CreateMonitor creates a new balance monitor. It starts a tracing span, applies precision to the monitor's condition value, and creates the monitor. It
balance.go:342
↓ 1 callers
Method
DeleteHook
(ctx context.Context, hookID string)
internal/hooks/types.go:68
↓ 1 callers
Method
DeleteIdentity
DeleteIdentity deletes an identity by its ID. Parameters: - id string: The ID of the identity to delete. Returns: - error: An error if the identity
identity.go:139
↓ 1 callers
Method
DeleteMonitor
DeleteMonitor deletes a balance monitor by its ID. It starts a tracing span, deletes the monitor, and records relevant events and errors. Parameters:
balance.go:463
↓ 1 callers
Function
DetectByContent
(data []byte)
internal/files/files.go:180
↓ 1 callers
Function
DetectByExtension
(filename string)
internal/files/files.go:175
↓ 1 callers
Function
DetectFileType
(data []byte, filename string)
internal/files/files.go:168
↓ 1 callers
Method
DetokenizeIdentity
DetokenizeIdentity detokenizes and returns all tokenized fields in an identity. Parameters: - identityID string: The ID of the identity. Returns: -
identity.go:286
↓ 1 callers
Method
DetokenizeIdentityField
DetokenizeIdentityField detokenizes a specific field in an identity. It extracts the identity ID and field name from the route parameters, detokenizes
api/identity.go:285
↓ 1 callers
Method
DropAllCollections
DropAllCollections drops all known collections from Typesense.
internal/search/reindex.go:408
↓ 1 callers
Method
DropCollection
DropCollection deletes a collection from Typesense.
internal/search/reindex.go:399
↓ 1 callers
Method
ExecutePostHooks
(ctx context.Context, transactionID string, data interface{})
internal/hooks/types.go:73
↓ 1 callers
Method
ExecutePreHooks
(ctx context.Context, transactionID string, data interface{})
internal/hooks/types.go:72
↓ 1 callers
Method
FetchAndGroupExternalTransactions
Records unmatched results for a reconciliation
database/repository.go:170
← previous
next →
501–600 of 1,908, ranked by callers