filter

package
v0.0.0-...-b84de06 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Match

func Match(obj interface{}, clauses []Clause) bool

Match returns true if the given object matches the given filter.

func ValueOf

func ValueOf(obj interface{}, field string) interface{}

ValueOf returns the value of the given field.

Types

type Clause

type Clause struct {
	PrevLogical string
	Not         bool
	Field       string
	Operator    string
	Value       string
}

Clause is a single filter clause in a filter string.

func Parse

func Parse(s string) ([]Clause, error)

Parse a user-provided filter string.

Jump to

Keyboard shortcuts

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