Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareDays ¶ added in v0.1.1
Less establishes an ordering on Day.
func FromModelStream ¶ added in v0.1.2
Types ¶
type Builder ¶ added in v0.1.2
type Builder struct {
// contains filtered or unexported fields
}
Builder represents an unprocessed
type Collection ¶ added in v0.1.1
type Day ¶ added in v0.1.1
type Day struct { Date time.Time Prices []*model.Price Assertions []*model.Assertion Openings []*model.Open Transactions []*model.Transaction Closings []*model.Close Normalized price.NormalizedPrices Performance *Performance }
Day groups all commands for a given date.
type Performance ¶ added in v0.1.1
type Performance struct {
V0, V1, Inflow, Outflow, InternalInflow, InternalOutflow map[*model.Commodity]float64
PortfolioInflow, PortfolioOutflow float64
}
Performance holds aggregate information used to compute portfolio performance.
func (Performance) String ¶ added in v0.1.2
func (p Performance) String() string
type Processor ¶ added in v0.1.2
type Processor struct { DayStart func(*Day) error Price func(*model.Price) error Open func(*model.Open) error Transaction func(*model.Transaction) error Posting func(*model.Transaction, *model.Posting) error Assertion func(*model.Assertion) error Balance func(*model.Assertion, *model.Balance) error Close func(*model.Close) error DayEnd func(*Day) error }
func CloseAccounts ¶ added in v0.1.1
func CloseAccounts(j *Builder, reg *model.Registry, enable bool, partition date.Partition) *Processor
Balance balances the journal.
func ComputePrices ¶ added in v0.1.1
ComputePrices updates prices.
Click to show internal directories.
Click to hide internal directories.