filter

package
v0.0.0-...-ba1c585 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package filter contains filter implementations for matching collections and rows within them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGlobFilter

func NewGlobFilter(pattern string) (*globFilter, error)

func NewMultiPatternFilter

func NewMultiPatternFilter(wps []wire.CollectionRowPattern) (*multiPatternFilter, error)

func NewPatternFilter

func NewPatternFilter(wp wire.CollectionRowPattern) (*patternFilter, error)

Types

type CollectionRowFilter

type CollectionRowFilter interface {
	// CollectionMatches should return true iff the specified collection matches
	// the filter.
	CollectionMatches(cxId wire.Id) bool

	// RowMatches should return true iff the specified row in the specified
	// collection matches the filter. It must return false if CollectionMatches
	// returns false for the specified collection.
	// TODO(ivanpi): Match might require passing in value, e.g. for query filters.
	RowMatches(cxId wire.Id, key string) bool
}

CollectionRowFilter specifies a filter on collections and rows within them.

Jump to

Keyboard shortcuts

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