Documentation
¶
Overview ¶
Package bean contains all beancount logic Including parsing, validating, calculating etc
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintAccBalances ¶
func PrintAccBalances(accBalances AccBal)
PrintAccBalances pretty prints account balances by currency
Types ¶
type AccountEvent ¶
AccountEvent is opening/closing accounts
func (AccountEvent) String ¶
func (ae AccountEvent) String() string
type AccountTimeLine ¶
type AccountTimeLine = map[AccountName][]AccountEvent
AccountTimeLine is a map of account events, sorted ascending by date well it should be...
func NewAccountTimeLine ¶
func NewAccountTimeLine(aes []AccountEvent) (AccountTimeLine, error)
NewAccountTimeLine maps the AccountEvents by AccountName
type Amount ¶
Amount is a number with a currency
func MustNewAmount ¶
MustNewAmount creates an Amount and panics! on underlying errors
type CcyAmount ¶
CcyAmount is a map of Ccy -> number
func MustNewCcyAmount ¶
MustNewCcyAmount converts a regular string map to a CcyAmount
type Directive ¶
type Directive struct {
Lines []Line
}
Directive is one or more lines that go together
type Ledger ¶
type Ledger struct {
AccountEvents []AccountEvent
AccountTimeLine AccountTimeLine
Balances []Balance
Transactions []Transaction
Postings []Posting
Prices []Price
Pads []Pad
}
Ledger is the full view of the beancount file
func (*Ledger) GetBalances ¶
GetBalances returns the final balance of all accounts, separately for each currency
type Line ¶
A Line from the beancount file
type Posting ¶
type Posting struct {
Account Account
Amount *Amount // to allow nil
Transaction *Transaction // nil until exctractPostings is run
}
Posting is an individual leg of a transaction