filters

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Match

type Match struct {
	Key    string
	Values string
	Not    bool
}

func NewMatch

func NewMatch(key, values string) Match

func NewNotMatch

func NewNotMatch(key, values string) Match

type MultiQueries

type MultiQueries = []SingleQuery

MultiQueries is an union group of singleQueries (OR'ed)

func Parse

func Parse(raw string) (MultiQueries, error)

Example of raw filters (url-encoded): foo=a,b&bar=c|baz=d Produces: [ [ ["foo", "a,b"], ["bar", "c"]], [["baz", "d"]]] ^ ^ ^ | | '--- Per-label OR: "foo" must have value "a" OR "b" | '----- In-group AND: "foo" must be "a" or "b" AND "bar" must be "c" '------- All groups OR: "foo" must be "a" or "b" AND "bar" must be "c", OR "baz" must be "d"

type SingleQuery

type SingleQuery = []Match

singleQuery is an intersect group of matches (AND'ed)

Jump to

Keyboard shortcuts

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