consumers

package
v0.0.0-...-f0c4f2b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

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

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

type EntryAggregator interface {
	Include(entry fin.Entry)
}

EntryAggregator aggregates Entry values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL