Documentation
¶
Overview ¶
Package ledgerforge provides the stable public API for LedgerForge Core.
The implementation lives in an internal core package. This facade intentionally preserves the original github.com/devaccuracy/ledgerforge import path for existing applications while keeping the repository root focused on module metadata and public compatibility.
Index ¶
- Constants
- Variables
- func ClassifyInflightError(err error) string
- func DocumentToIndexMap(document interface{}) (map[string]interface{}, error)
- func IsDuplicateReferenceError(err error) bool
- func IsInflightTransaction(transaction *model.Transaction) bool
- func NewBalanceTracker() *model.BalanceTracker
- type Allocation
- type BalanceLineage
- type BatchJobResult
- type BulkInflightAction
- type BulkInflightItem
- type BulkInflightOutcome
- type BulkTransactionError
- type ChainProcessor
- type ChainVerifyResult
- type IndexTask
- type IndexUpserter
- type InflightActionPayload
- type LedgerForge
- type LineageOutboxPayload
- type LineageOutboxProcessor
- type LineageSource
- type NewWebhook
- type ProviderBreakdown
- type Queue
- type QueuedTransactionRecoveryProcessor
- type RefundOptions
- type ReindexProgress
- type TransactionLineage
- type TransactionTypePayload
Constants ¶
const ( InflightActionCommit = core.InflightActionCommit InflightActionVoid = core.InflightActionVoid IndexModeRefresh = core.IndexModeRefresh BulkInflightCommit = core.BulkInflightCommit BulkInflightVoid = core.BulkInflightVoid GeneralLedgerID = core.GeneralLedgerID LineageProviderKey = core.LineageProviderKey LineageFundAllocation = core.LineageFundAllocation AllocationFIFO = core.AllocationFIFO AllocationLIFO = core.AllocationLIFO AllocationProp = core.AllocationProp StatusQueued = core.StatusQueued StatusApplied = core.StatusApplied StatusScheduled = core.StatusScheduled StatusRejected = core.StatusRejected StatusInflight = core.StatusInflight StatusVoid = core.StatusVoid StatusCommit = core.StatusCommit StatusStarted = core.StatusStarted StatusInProgress = core.StatusInProgress StatusCompleted = core.StatusCompleted StatusFailed = core.StatusFailed )
Variables ¶
var ( ErrReindexInProgress = search.ErrReindexInProgress ErrReindexNotStarted = search.ErrReindexNotStarted ErrReindexClosed = search.ErrReindexClosed )
Reindex errors preserve admission and progress semantics across transports.
var ErrEntityNotFound = core.ErrEntityNotFound
ErrEntityNotFound indicates that a metadata target does not exist.
var ErrInflightActionQueued = core.ErrInflightActionQueued
ErrInflightActionQueued indicates a pending commit or void for a transaction.
var ErrQueueBackpressure = core.ErrQueueBackpressure
ErrQueueBackpressure indicates that the queue cannot safely accept more work.
var SQLFiles embed.FS = core.SQLFiles
SQLFiles contains the embedded migration files used by the LedgerForge CLI.
Functions ¶
func ClassifyInflightError ¶
ClassifyInflightError returns the public error code for an inflight operation.
func DocumentToIndexMap ¶
DocumentToIndexMap converts a search document into its index representation.
func IsDuplicateReferenceError ¶
IsDuplicateReferenceError identifies a transaction reference conflict.
func IsInflightTransaction ¶
func IsInflightTransaction(transaction *model.Transaction) bool
IsInflightTransaction reports whether a transaction is an inflight transaction.
func NewBalanceTracker ¶
func NewBalanceTracker() *model.BalanceTracker
NewBalanceTracker creates a balance tracker.
Types ¶
type Allocation ¶
type Allocation = core.Allocation
type BalanceLineage ¶
type BalanceLineage = core.BalanceLineage
type BatchJobResult ¶
type BatchJobResult = core.BatchJobResult
type BulkInflightAction ¶
type BulkInflightAction = core.BulkInflightAction
type BulkInflightItem ¶
type BulkInflightItem = core.BulkInflightItem
type BulkInflightOutcome ¶
type BulkInflightOutcome = core.BulkInflightOutcome
type BulkTransactionError ¶
type BulkTransactionError = core.BulkTransactionError
type ChainProcessor ¶
type ChainProcessor = core.ChainProcessor
func NewChainProcessor ¶
func NewChainProcessor(service *LedgerForge) *ChainProcessor
NewChainProcessor creates the transaction hash-chain worker.
type ChainVerifyResult ¶
type ChainVerifyResult = core.ChainVerifyResult
type IndexUpserter ¶
type IndexUpserter = core.IndexUpserter
type InflightActionPayload ¶
type InflightActionPayload = core.InflightActionPayload
type LedgerForge ¶
type LedgerForge = core.LedgerForge
func NewLedgerForge ¶
func NewLedgerForge(db database.IDataSource) (*LedgerForge, error)
NewLedgerForge initializes a LedgerForge instance using the provided datasource.
type LineageOutboxPayload ¶
type LineageOutboxPayload = core.LineageOutboxPayload
type LineageOutboxProcessor ¶
type LineageOutboxProcessor = core.LineageOutboxProcessor
func NewLineageOutboxProcessor ¶
func NewLineageOutboxProcessor(service *LedgerForge) *LineageOutboxProcessor
NewLineageOutboxProcessor creates the lineage outbox worker.
type LineageSource ¶
type LineageSource = core.LineageSource
type NewWebhook ¶
type NewWebhook = core.NewWebhook
type ProviderBreakdown ¶
type ProviderBreakdown = core.ProviderBreakdown
type Queue ¶
func NewQueue ¶
func NewQueue(conf *config.Configuration, client *asynq.Client) *Queue
NewQueue creates the transaction queue service.
func NewQueueWithRedisClient ¶
func NewQueueWithRedisClient(conf *config.Configuration, client *asynq.Client, redisClient redis.UniversalClient) *Queue
NewQueueWithRedisClient creates a queue with Redis memory backpressure checks.
type QueuedTransactionRecoveryProcessor ¶
type QueuedTransactionRecoveryProcessor = core.QueuedTransactionRecoveryProcessor
func NewQueuedTransactionRecoveryProcessor ¶
func NewQueuedTransactionRecoveryProcessor(service *LedgerForge) *QueuedTransactionRecoveryProcessor
NewQueuedTransactionRecoveryProcessor creates the queued-transaction recovery worker.
type RefundOptions ¶
type RefundOptions = core.RefundOptions
type ReindexProgress ¶
type ReindexProgress = search.ReindexProgress
type TransactionLineage ¶
type TransactionLineage = core.TransactionLineage
type TransactionTypePayload ¶
type TransactionTypePayload = core.TransactionTypePayload
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
ledgerforge
command
|
|
|
ledgerforge-mcp
command
ledgerforge-mcp exposes a LedgerForge deployment to MCP clients over stdio.
|
ledgerforge-mcp exposes a LedgerForge deployment to MCP clients over stdio. |
|
internal
|
|
|
core
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. |
|
mcpserver
Package mcpserver exposes selected LedgerForge operations through the Model Context Protocol.
|
Package mcpserver exposes selected LedgerForge operations through the Model Context Protocol. |
|
policy
Package policy implements server-enforced API-key spending admissions.
|
Package policy implements server-enforced API-key spending admissions. |
|
tests
|
|
|
loadtest/tools
command
|