Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountCloser ¶ added in v0.0.13
type AccountCloser struct {
Balance *Balance
}
AccountCloser closes accounts.
type AccountOpener ¶ added in v0.0.13
type AccountOpener struct {
Balance *Balance
}
AccountOpener keeps track of open accounts.
type Accounts ¶ added in v0.0.13
Accounts keeps track of open accounts.
type Asserter ¶ added in v0.0.13
type Asserter struct {
Balance *Balance
}
Asserter keeps track of open accounts.
type Balance ¶
type Balance struct { Date time.Time Amounts, Values map[CommodityAccount]decimal.Decimal Accounts Accounts Context ledger.Context Valuation *ledger.Commodity NormalizedPrices prices.NormalizedPrices }
Balance represents a balance for accounts at the given date.
func Diffs ¶
Diffs creates the difference balances for the given slice of balances. The returned slice is one element smaller than the input slice. The balances are mutated.
type Builder ¶ added in v0.0.8
type Builder struct {
From, To *time.Time
Period date.Period
Last int
Valuation *ledger.Commodity
Close, Diff bool
}
Builder builds a sequence of balances.
type CommodityAccount ¶ added in v0.0.7
CommodityAccount represents a position.
func (CommodityAccount) Less ¶ added in v0.0.7
func (p CommodityAccount) Less(p1 CommodityAccount) bool
Less establishes a partial ordering of commodity accounts.
type DateUpdater ¶ added in v0.0.13
type DateUpdater struct {
Balance *Balance
}
DateUpdater keeps track of open accounts.
type Error ¶ added in v0.0.6
type Error struct {
// contains filtered or unexported fields
}
Error is an error.
type PeriodCloser ¶ added in v0.0.13
type PeriodCloser struct {
Balance *Balance
}
PeriodCloser closes the accounting period.
type PriceUpdater ¶ added in v0.0.13
type PriceUpdater struct { Balance *Balance // contains filtered or unexported fields }
PriceUpdater keeps track of prices.
func (*PriceUpdater) Initialize ¶ added in v0.0.13
func (a *PriceUpdater) Initialize(_ ledger.Ledger) error
Initialize implements Initializer.
type Snapshotter ¶ added in v0.0.13
type Snapshotter struct { Balance *Balance From, To *time.Time Last int Diff bool Period date.Period Result *[]*Balance // contains filtered or unexported fields }
Snapshotter keeps track of open accounts.
func (*Snapshotter) Finalize ¶ added in v0.0.13
func (a *Snapshotter) Finalize() error
Finalize implements Finalizer.
func (*Snapshotter) Initialize ¶ added in v0.0.13
func (a *Snapshotter) Initialize(l ledger.Ledger) error
Initialize implements Initializer.
type TransactionBooker ¶ added in v0.0.13
type TransactionBooker struct {
Balance *Balance
}
TransactionBooker books transaction amounts.
type TransactionValuator ¶ added in v0.0.13
type TransactionValuator struct {
Balance *Balance
}
TransactionValuator valuates transactions.
type ValuationTransactionComputer ¶ added in v0.0.13
type ValuationTransactionComputer struct {
Balance *Balance
}
ValuationTransactionComputer valuates transactions.
type ValueBooker ¶ added in v0.0.13
type ValueBooker struct {
Balance *Balance
}
ValueBooker books amounts for value directives.