consumers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package streams contains useful consumers of basic types

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromCatPaymentAggregator

func FromCatPaymentAggregator(
	aggregator CatPaymentAggregator) goconsume.Consumer

FromCatPaymentAggregator converts a CatPaymentAggregator to a Consumer of fin.Entry values.

func FromEntryAggregator

func FromEntryAggregator(
	aggregator EntryAggregator) goconsume.Consumer

FromEntryAggregator converts a EntryAggregator to a Consumer of fin.Entry values.

Types

type AddBalance

type AddBalance struct {
	// ending balance
	Balance int64
	// EntryBalance values passed on here
	EntryBalanceConsumer goconsume.Consumer
	// contains filtered or unexported fields
}

AddBalance is a consumer of Entry values that passes on EntryBalance values. AddBalance consumes Entry values newest to oldest passing on each Entry value along with the current balance.

func (*AddBalance) CanConsume

func (c *AddBalance) CanConsume() bool

func (*AddBalance) Consume

func (c *AddBalance) Consume(ptr interface{})

type CatPaymentAggregator

type CatPaymentAggregator interface {
	Include(cp *fin.CatPayment)
}

CatPaymentAggregator aggregates CatPayment values.

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