Documentation ¶
Overview ¶
Package consumers contains useful consumers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromCatPaymentAggregator ¶
func FromCatPaymentAggregator( aggregator CatPaymentAggregator) consume2.Consumer[fin.Entry]
FromCatPaymentAggregator converts a CatPaymentAggregator to a Consumer of fin.Entry values.
func FromEntryAggregator ¶
func FromEntryAggregator( aggregator EntryAggregator) consume2.Consumer[fin.Entry]
FromEntryAggregator converts a EntryAggregator to a Consumer of fin.Entry values.
Types ¶
type CatPaymentAggregator ¶
type CatPaymentAggregator interface {
Include(cp fin.CatPayment)
}
CatPaymentAggregator aggregates CatPayment values.
type CatPopularityBuilder ¶
type CatPopularityBuilder struct {
// contains filtered or unexported fields
}
CatPopularityBuilder builds a fin.CatPopularity instance. CatPopularityBuilder implements consume2.Consumer[fin.Entry].
func NewCatPopularityBuilder ¶
func NewCatPopularityBuilder(maxEntriesToRead int) *CatPopularityBuilder
NewCatPopularityBuilder returns a consumer that consumes Entry values to build a fin.CatPopularity instance. The returned consumer consumes at most maxEntriesToRead values with categories other than the top level expense category and skips values that have only the top level expense category.
func (*CatPopularityBuilder) Build ¶
func (c *CatPopularityBuilder) Build() fin.CatPopularity
Build builds the fin.CatPopularity instance.
func (*CatPopularityBuilder) CanConsume ¶
func (c *CatPopularityBuilder) CanConsume() bool
func (*CatPopularityBuilder) Consume ¶
func (c *CatPopularityBuilder) Consume(entry fin.Entry)
type EntryAggregator ¶
EntryAggregator aggregates Entry values.