filters

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: 4 Imported by: 0

Documentation

Overview

Package filters contains useful search filters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompileAdvanceSearchSpec

func CompileAdvanceSearchSpec(spec *AdvanceSearchSpec) goconsume.FilterFunc

CompileAdvanceSearchSpec compiles a search specification into a functional.Filterer object.

Types

type AdvanceSearchSpec

type AdvanceSearchSpec struct {
	Name string
	Desc string
	// If present, include only entries with line items that match CF.
	CF fin.CatFilter
	// If present, include only entries whose total matches AF.
	AF AmountFilter
}

AdvanceSearchSpec specifies what entries to search for. searches ignore case and whitespace.

type AmountFilter

type AmountFilter func(amt int64) bool

AmountFilter filters by amount. Returns true if amt should be included or false otherwise.

Jump to

Keyboard shortcuts

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