filters

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2018 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByKind

func ByKind(transactions []transactionhistory.Transaction, kinds []Kind) []transactionhistory.Transaction

ByKind filters transactions by the given list of kinds, returning only transactions that are that kind of transaction.

func ByWeekday

func ByWeekday(transactions []transactionhistory.Transaction, weekdays []time.Weekday) []transactionhistory.Transaction

ByWeekday filters transactions by the given weekday, returning only transactions that occurred on that weekday.

Types

type Kind

type Kind int

Kind is a kind of Transaction.

const (
	// Informational transactions do not affect the balance.
	Informational Kind = iota
	// Credit transactions increase the balance.
	Credit
	// Debit transactions reduce the balance.
	Debit
)

Jump to

Keyboard shortcuts

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