filter

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 6 Imported by: 2

Documentation

Overview

Package filter provides a way to filter resources based on a set of criteria.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	Property string
	Type     Type
	Value    string
	Invert   string
}

func NewExactFilter

func NewExactFilter(value string) Filter

func (*Filter) Match

func (f *Filter) Match(o string) (bool, error)

func (*Filter) UnmarshalYAML

func (f *Filter) UnmarshalYAML(unmarshal func(interface{}) error) error

func (*Filter) Validate

func (f *Filter) Validate() error

type Filters

type Filters map[string][]Filter

func (Filters) Merge

func (f Filters) Merge(f2 Filters)

func (Filters) Validate

func (f Filters) Validate() error

type Type

type Type string
const (
	Empty         Type = ""
	Exact         Type = "exact"
	Glob          Type = "glob"
	Regex         Type = "regex"
	Contains      Type = "contains"
	DateOlderThan Type = "dateOlderThan"
	Suffix        Type = "suffix"
	Prefix        Type = "prefix"
)

Jump to

Keyboard shortcuts

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