filter

package
Version: v0.0.0-...-04e5504 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 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
t or T : Toggle theme light dark auto
y or Y : Canonical URL