Documentation ¶
Index ¶
- func FilterAccount(r *regexp.Regexp) filter.Filter[Key]
- func FilterCommodity(r *regexp.Regexp) filter.Filter[Key]
- func FilterDates(t time.Time) filter.Filter[Key]
- func FilterOther(r *regexp.Regexp) filter.Filter[Key]
- func Identity[T any](t T) T
- func SortByAccount(jctx journal.Context, w map[*journal.Account]float64) compare.Compare[Key]
- func SortByCommodity(k1, k2 Key) compare.Order
- func SortByDate(k1, k2 Key) compare.Order
- type Amounts
- func (am Amounts) Add(k Key, d decimal.Decimal)
- func (am Amounts) Amount(k Key) decimal.Decimal
- func (am Amounts) Clone() Amounts
- func (am Amounts) Commodities() map[*journal.Commodity]struct{}
- func (am Amounts) CommoditiesSorted() []*journal.Commodity
- func (am Amounts) Dates() map[time.Time]struct{}
- func (am Amounts) DatesSorted() []time.Time
- func (am Amounts) Index(cmp compare.Compare[Key]) []Key
- func (am Amounts) Minus(a Amounts) Amounts
- func (am Amounts) Plus(a Amounts) Amounts
- func (am Amounts) SumBy(f func(k Key) bool, m func(k Key) Key) Amounts
- func (am Amounts) SumIntoBy(as Amounts, f func(k Key) bool, m func(k Key) Key)
- func (am Amounts) SumOver(f func(k Key) bool) decimal.Decimal
- type Key
- type KeyMapper
- type Mapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortByAccount ¶ added in v0.0.16
func SortByCommodity ¶ added in v0.0.16
func SortByDate ¶ added in v0.0.16
Types ¶
type Amounts ¶
Amounts keeps track of amounts by account and commodity.
func (Amounts) Commodities ¶ added in v0.0.16
func (Amounts) CommoditiesSorted ¶ added in v0.0.16
func (Amounts) DatesSorted ¶ added in v0.0.16
type Key ¶ added in v0.0.16
type Key struct { Date time.Time Account, Other *journal.Account Commodity *journal.Commodity Valuation *journal.Commodity }
Key represents a position.
func AccountCommodityKey ¶ added in v0.0.16
func AccountKey ¶ added in v0.0.16
func CommodityKey ¶ added in v0.0.16
func DateCommodityKey ¶ added in v0.0.16
Click to show internal directories.
Click to hide internal directories.