filter

package
v0.0.0-...-070373f Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 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 ObjectFilters

type ObjectFilters struct {
	Cluster   Regex `json:"cluster"`
	Group     Regex `json:"group"`
	Version   Regex `json:"version"`
	Resource  Regex `json:"resource"`
	Namespace Regex `json:"namespace"`
	Name      Regex `json:"name"`
}

func (*ObjectFilters) Check

func (f *ObjectFilters) Check(object utilobject.VersionedKey) bool

type Regex

type Regex struct {
	// golang regex not support (?!..), use third party regular engine for go
	Pattern *regexp2.Regexp
}

func (*Regex) MatchString

func (regex *Regex) MatchString(s string) bool

func (*Regex) UnmarshalText

func (regex *Regex) UnmarshalText(text []byte) (err error)

type TagFilters

type TagFilters map[string]Regex

func (TagFilters) Check

func (f TagFilters) Check(tags map[string]string) bool

Jump to

Keyboard shortcuts

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