Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assertion ¶
type Assertion struct {
Directive
Account *accounts.Account
Amount decimal.Decimal
Commodity *commodities.Commodity
}
Assertion represents a balance assertion.
type CommodityAccount ¶
type CommodityAccount struct {
// contains filtered or unexported fields
}
CommodityAccount represents a position.
func NewCommodityAccount ¶
func NewCommodityAccount(a *accounts.Account, c *commodities.Commodity) CommodityAccount
NewCommodityAccount creates a new position
func (CommodityAccount) Account ¶
func (p CommodityAccount) Account() *accounts.Account
Account returns the account.
func (CommodityAccount) Commodity ¶
func (p CommodityAccount) Commodity() *commodities.Commodity
Commodity returns the commodity.
func (CommodityAccount) Less ¶
func (p CommodityAccount) Less(p1 CommodityAccount) bool
Less establishes a partial ordering of commodity accounts.
type Directive ¶
type Directive struct {
Pos Range
// contains filtered or unexported fields
}
Directive is a directive in a journal.
func NewDirective ¶
NewDirective returns a new directive.
type Position ¶
type Position struct {
CommodityAccount
Amounts amount.Vec
}
Position is a position.
type Posting ¶
type Posting struct {
Amount amount.Amount
Credit, Debit *accounts.Account
Commodity *commodities.Commodity
Lot *Lot
Tag *Tag
}
Posting represents a posting.
func NewPosting ¶
func NewPosting(crAccount, drAccount *accounts.Account, commodity *commodities.Commodity, amt decimal.Decimal, tag *Tag) *Posting
NewPosting creates a new posting from the given parameters. If amount is negative, it will be inverted and the accounts reversed.
type Price ¶
type Price struct {
Directive
Commodity *commodities.Commodity
Target *commodities.Commodity
Price float64
}
Price represents a price command.
type Transaction ¶
Transaction represents a transaction.
Click to show internal directories.
Click to hide internal directories.