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 FilePosition ¶ added in v0.0.6
FilePosition is a position of a character in a text file.
func (FilePosition) String ¶ added in v0.0.6
func (p FilePosition) String() string
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 Range ¶
type Range struct {
Start, End FilePosition
}
Range describes a range in the source code.
type Transaction ¶
Transaction represents a transaction.