Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultLotName = ""
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Name string CreationDate Date ClosingDate Date Commodities map[string]*Commodity Lots map[string]map[string]*Lot // lot name -> commodity name -> *Lot Tags map[string]bool Notes map[string]string }
func NewAccount ¶
type Commodity ¶
func NewCommodity ¶
type Context ¶
type Context struct { Date Date Accounts map[string]*Account Commodities map[string]*Commodity Tags map[string][]TagTarget }
func NewContext ¶
func NewContext() *Context
type ExchangeRate ¶
func NewExchangeRateFromTotalPrice ¶
func NewExchangeRateFromTotalPrice(balance, totalPrice Quantity) ExchangeRate
func NewExchangeRateFromUnitPrice ¶
func NewExchangeRateFromUnitPrice(balance, unitPrice Quantity) ExchangeRate
type Lot ¶
type Lot struct { Name string CreationDate Date Balance Quantity ExchangeRate *ExchangeRate }
Click to show internal directories.
Click to hide internal directories.