filter

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2019 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllFilter added in v0.4.0

type AllFilter struct{}

The AllFilter matches anything it's given

func NewAllFilter added in v0.4.0

func NewAllFilter() *AllFilter

func (*AllFilter) AmbiguousError added in v0.4.0

func (f *AllFilter) AmbiguousError(_ []filterer.Match) *filterer.AmbiguousError

The AllFilter shouldn't be used to match single Objects

func (*AllFilter) Filter added in v0.4.0

func (f *AllFilter) Filter(object meta.Object) (filterer.Match, error)

func (*AllFilter) NonexistentError added in v0.4.0

func (f *AllFilter) NonexistentError() *filterer.NonexistentError

func (*AllFilter) SetKind added in v0.4.0

func (f *AllFilter) SetKind(_ meta.Kind)

SetKind is a no-op as this filter doesn't have a dedicated kind

type IDNameFilter added in v0.4.0

type IDNameFilter struct {
	// contains filtered or unexported fields
}

The IDNameFilter is the basic filter matching objects by their ID/name

func NewIDNameFilter added in v0.4.0

func NewIDNameFilter(p string) *IDNameFilter

func (*IDNameFilter) AmbiguousError added in v0.4.0

func (f *IDNameFilter) AmbiguousError(matches []filterer.Match) *filterer.AmbiguousError

func (*IDNameFilter) FilterMeta added in v0.4.0

func (f *IDNameFilter) FilterMeta(object meta.Object) (filterer.Match, error)

func (*IDNameFilter) NonexistentError added in v0.4.0

func (f *IDNameFilter) NonexistentError() *filterer.NonexistentError

func (*IDNameFilter) SetKind added in v0.4.0

func (f *IDNameFilter) SetKind(k meta.Kind)

type IDNameMatch added in v0.4.1

type IDNameMatch struct {
	*filterer.GenericMatch
	// contains filtered or unexported fields
}

type NameFilter added in v0.4.0

type NameFilter struct {
	// contains filtered or unexported fields
}

The NameFilter matches Objects by their exact name

func NewNameFilter added in v0.4.0

func NewNameFilter(n string) *NameFilter

func (*NameFilter) AmbiguousError added in v0.4.0

func (f *NameFilter) AmbiguousError(_ []filterer.Match) *filterer.AmbiguousError

func (*NameFilter) FilterMeta added in v0.4.0

func (f *NameFilter) FilterMeta(object meta.Object) (filterer.Match, error)

func (*NameFilter) NonexistentError added in v0.4.0

func (f *NameFilter) NonexistentError() *filterer.NonexistentError

func (*NameFilter) SetKind added in v0.4.0

func (f *NameFilter) SetKind(k meta.Kind)

type VMFilter added in v0.4.0

type VMFilter struct {
	*IDNameFilter
	// contains filtered or unexported fields
}

The VMFilter filters only VMs, but has special functionality for matching If wanting to match all VMs, input a blank string as the prefix This ObjectFilter embeds a MetaFilter, which is OK, as ObjectFilter interface compatibility is checked before the MetaFilter interface

func NewVMFilter added in v0.4.0

func NewVMFilter(p string) *VMFilter

func NewVMFilterAll added in v0.4.0

func NewVMFilterAll(p string, all bool) *VMFilter

func (*VMFilter) Filter added in v0.4.0

func (f *VMFilter) Filter(object meta.Object) (filterer.Match, error)

Jump to

Keyboard shortcuts

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