Documentation ¶
Index ¶
- Constants
- Variables
- func MustKeepGroup(ff []Filter, group Name, targets ...Target) (keep bool, err error)
- func MustKeepKeyValue2(ff []Filter, key Code, value string, targets ...Target) (keep bool, err error)
- func OmitGroup(ff []Filter, group Name, targets ...Target) (omit bool, err error)
- func OmitKeyValue2(ff []Filter, key Code, value string, targets ...Target) (omit bool, err error)
- type Code
- type Comparison
- type Effect
- type Filter
- type Funcs1Getter
- type Funcs2Getter
- type Group
- type KeepWhenGroupIsOneOf
- type KeepWhenGroupIsOneOfIgnoringCase
- type KeepWhenKeyIsOneOf
- type KeepWhenKeyIsOneOfIgnoringCase
- type KeepWhenKeyPrefixIsOneOf
- type KeyValue
- type Label
- type LabelName
- type LabelValue
- type Labels
- func (ll *Labels) ContainsAny(labels ...*Label) (contains bool)
- func (ll *Labels) DeleteNamedLabel(name LabelName)
- func (ll *Labels) Equivalent(labels *Labels) (eq bool)
- func (ll *Labels) GetNamedLabel(name LabelName) *Label
- func (ll *Labels) HasLabel(label *Label) bool
- func (ll *Labels) HasNamedLabel(name LabelName) bool
- func (ll *Labels) LabelPtrs() []*Label
- func (ll *Labels) SetLabel(label *Label)
- func (ll *Labels) String() string
- func (ll *Labels) SyncMap()
- func (ll *Labels) Valid() (ok bool)
- type MatchFunc1
- type MatchFunc2
- type Matches
- type Name
- type OmitWhenGroupContainsOneOf
- type OmitWhenGroupContainsOneOfIgnoringCase
- type OmitWhenGroupIsNotOneOf
- type OmitWhenGroupIsOneOf
- type OmitWhenGroupPassedToFuncReturnsFalse
- type OmitWhenGroupPassedToFuncReturnsFalseIgnoringCase
- type OmitWhenGroupPassedToFuncReturnsTrue
- type OmitWhenGroupPassedToFuncReturnsTrueIgnoringCase
- type OmitWhenGroupPrefixIsNotOneOf
- type OmitWhenGroupPrefixIsNotOneOfIgnoringCase
- type OmitWhenGroupPrefixIsOneOf
- type OmitWhenGroupPrefixIsOneOfIgnoringCase
- type OmitWhenGroupSuffixIsOneOf
- type OmitWhenGroupSuffixIsOneOfIgnoringCase
- type OmitWhenKeyContainsOneOf
- type OmitWhenKeyContainsOneOfIgnoringCase
- type OmitWhenKeyIsOneOf
- type OmitWhenKeyIsOneOfIgnoringCase
- type OmitWhenKeyMatchedByRegexp
- type OmitWhenKeyMatchedByRegexpIgnoringCase
- type OmitWhenKeyPassedToFuncReturnsFalse
- type OmitWhenKeyPassedToFuncReturnsFalseIgnoringCase
- type OmitWhenKeyPassedToFuncReturnsTrue
- type OmitWhenKeyPassedToFuncReturnsTrueIgnoringCase
- type OmitWhenKeyPrefixIsNotOneOf
- type OmitWhenKeyPrefixIsNotOneOfIgnoringCase
- type OmitWhenKeyPrefixIsOneOf
- type OmitWhenKeyPrefixIsOneOfIgnoringCase
- type OmitWhenKeySuffixIsNotOneOf
- type OmitWhenKeySuffixIsNotOneOfIgnoringCase
- type OmitWhenKeySuffixIsOneOf
- type OmitWhenKeySuffixIsOneOfIgnoringCase
- type OmitWhenValueMatchedByOneOfRegexps
- type OmitWhenValueMatchedByOneOfRegexpsIgnoringCase
- type OmitWhenValueNotMatchedByOneOfRegexps
- type OmitWhenValueNotMatchedByOneOfRegexpsIgnoringCase
- type OmitWhenValuePassedToFuncReturnsFalse
- type OmitWhenValuePassedToFuncReturnsFalseIgnoringCase
- type OmitWhenValuePassedToFuncReturnsTrue
- type OmitWhenValuePassedToFuncReturnsTrueIgnoringCase
- type QueryArgs
- type Target
- type ValuesGetter
Constants ¶
View Source
const ( InvalidEffect Effect = 0 Omit = 'o' Keep = 'k' )
View Source
const ( InvalidComparison Comparison = 0 Equals = '=' NotEquals = '!' IsTrue = Equals IsFalse = NotEquals IsMatched = Equals NotMatched = NotEquals )
View Source
const ( InvalidTarget Target = 0 Groups = 'g' Keys = 'k' Values = 'v' KeyValues = 'b' // b=both )
View Source
const ( InvalidMatches Matches = 0 Prefix = 'p' Suffix = 's' Entirety = 'e' Func = 'f' Regexp = 'r' Contains = 'c' )
Variables ¶
View Source
var ( ErrUnknown = errors.New("unknown") ErrFailedToAccessGroupKeyValues = errors.New("failed to access key values for group") ErrFailedToInitializeGroup = errors.New("failed to initialize group") ErrFailedTypeAssertion = errors.New("invalid type assertion") ErrInvalidRegExp = errors.New("invalid regexp") ErrInvalidFilterMatchCriteria = errors.New("invalid filter match criteria") )
View Source
var KeyValueOrKeyValue = []Target{Keys, Values, KeyValues}
Functions ¶
func MustKeepGroup ¶
MustKeepGroup returns true is a value matches ANY Keep kvfilters. Rarely use this as it overrides all Omit kvfilters.
func MustKeepKeyValue2 ¶
func MustKeepKeyValue2(ff []Filter, key Code, value string, targets ...Target) (keep bool, err error)
MustKeepKeyValue2 returns true is a key or value as appropriate matches ANY Keep kvfilters.
Types ¶
type Code ¶
Code is the camel-cased version of name without spaces used for comparison, e.g. "userManaged" instead of "User Managed."
type Comparison ¶
type Comparison byte
type Filter ¶
type Filter interface { Effect() Effect Target() Target Comparison() Comparison Matches() Matches IgnoreCase() bool }
func MontereyQueryFilters ¶
func MontereyQueryFilters() []Filter
func SequoiaQueryFilters ¶
func SequoiaQueryFilters() []Filter
type Funcs1Getter ¶
type Funcs1Getter interface {
Funcs1() []MatchFunc1
}
type Funcs2Getter ¶
type Funcs2Getter interface {
Funcs2() []MatchFunc2
}
type Group ¶
type Group interface { Name() Name Code() Code KeyValues() []KeyValue AddKeyValue(KeyValue) LogArgs() []any ErrorInfo() error ShallowCopy() Group Valid() bool fmt.Stringer }
func NewGroupFromGroup ¶
NewGroupFromGroup creates a new group from an existing one w/o copying its keyValues
func QueryGroups ¶
type KeepWhenGroupIsOneOf ¶
type KeepWhenGroupIsOneOf []string
type KeepWhenGroupIsOneOfIgnoringCase ¶
type KeepWhenGroupIsOneOfIgnoringCase []string
type KeepWhenKeyIsOneOf ¶
type KeepWhenKeyIsOneOf []string
type KeepWhenKeyIsOneOfIgnoringCase ¶
type KeepWhenKeyIsOneOfIgnoringCase []string
type KeepWhenKeyPrefixIsOneOf ¶
type KeepWhenKeyPrefixIsOneOf []string
type Label ¶
type Label struct { Name LabelName Value LabelValue IsUnknown bool }
func NewLabel ¶
func NewLabel(name LabelName, value LabelValue) Label
func NewUnknownLabel ¶
func NewUnknownLabel(name LabelName, value LabelValue) Label
type LabelValue ¶
type LabelValue string
func (LabelValue) String ¶
func (value LabelValue) String() string
type Labels ¶
type Labels struct {
// contains filtered or unexported fields
}
func (*Labels) ContainsAny ¶
func (*Labels) DeleteNamedLabel ¶
DeleteNamedLabel removes the label that has the passed label name.
func (*Labels) Equivalent ¶
func (*Labels) GetNamedLabel ¶
func (*Labels) HasNamedLabel ¶
HasNamedLabel returns true if `*Labels` has a label with the passed label name
type MatchFunc1 ¶
type MatchFunc2 ¶
type OmitWhenGroupContainsOneOf ¶
type OmitWhenGroupContainsOneOf []string
type OmitWhenGroupContainsOneOfIgnoringCase ¶
type OmitWhenGroupContainsOneOfIgnoringCase []string
type OmitWhenGroupIsNotOneOf ¶
type OmitWhenGroupIsNotOneOf []string
type OmitWhenGroupIsOneOf ¶
type OmitWhenGroupIsOneOf []string
type OmitWhenGroupPassedToFuncReturnsFalse ¶
type OmitWhenGroupPassedToFuncReturnsFalse []MatchFunc1
type OmitWhenGroupPassedToFuncReturnsFalseIgnoringCase ¶
type OmitWhenGroupPassedToFuncReturnsFalseIgnoringCase []MatchFunc1
type OmitWhenGroupPassedToFuncReturnsTrue ¶
type OmitWhenGroupPassedToFuncReturnsTrue []MatchFunc1
type OmitWhenGroupPassedToFuncReturnsTrueIgnoringCase ¶
type OmitWhenGroupPassedToFuncReturnsTrueIgnoringCase []MatchFunc1
type OmitWhenGroupPrefixIsNotOneOf ¶
type OmitWhenGroupPrefixIsNotOneOf []string
type OmitWhenGroupPrefixIsNotOneOfIgnoringCase ¶
type OmitWhenGroupPrefixIsNotOneOfIgnoringCase []string
type OmitWhenGroupPrefixIsOneOf ¶
type OmitWhenGroupPrefixIsOneOf []string
type OmitWhenGroupPrefixIsOneOfIgnoringCase ¶
type OmitWhenGroupPrefixIsOneOfIgnoringCase []string
type OmitWhenGroupSuffixIsOneOf ¶
type OmitWhenGroupSuffixIsOneOf []string
type OmitWhenGroupSuffixIsOneOfIgnoringCase ¶
type OmitWhenGroupSuffixIsOneOfIgnoringCase []string
type OmitWhenKeyContainsOneOf ¶
type OmitWhenKeyContainsOneOf []string
type OmitWhenKeyContainsOneOfIgnoringCase ¶
type OmitWhenKeyContainsOneOfIgnoringCase []string
type OmitWhenKeyIsOneOf ¶
type OmitWhenKeyIsOneOf []string
type OmitWhenKeyIsOneOfIgnoringCase ¶
type OmitWhenKeyIsOneOfIgnoringCase []string
type OmitWhenKeyMatchedByRegexp ¶
type OmitWhenKeyMatchedByRegexp []string
type OmitWhenKeyMatchedByRegexpIgnoringCase ¶
type OmitWhenKeyMatchedByRegexpIgnoringCase []string
type OmitWhenKeyPassedToFuncReturnsFalse ¶
type OmitWhenKeyPassedToFuncReturnsFalse []MatchFunc1
type OmitWhenKeyPassedToFuncReturnsFalseIgnoringCase ¶
type OmitWhenKeyPassedToFuncReturnsFalseIgnoringCase []MatchFunc1
type OmitWhenKeyPassedToFuncReturnsTrue ¶
type OmitWhenKeyPassedToFuncReturnsTrue []MatchFunc1
type OmitWhenKeyPassedToFuncReturnsTrueIgnoringCase ¶
type OmitWhenKeyPassedToFuncReturnsTrueIgnoringCase []MatchFunc1
type OmitWhenKeyPrefixIsNotOneOf ¶
type OmitWhenKeyPrefixIsNotOneOf []string
type OmitWhenKeyPrefixIsNotOneOfIgnoringCase ¶
type OmitWhenKeyPrefixIsNotOneOfIgnoringCase []string
type OmitWhenKeyPrefixIsOneOf ¶
type OmitWhenKeyPrefixIsOneOf []string
type OmitWhenKeyPrefixIsOneOfIgnoringCase ¶
type OmitWhenKeyPrefixIsOneOfIgnoringCase []string
type OmitWhenKeySuffixIsNotOneOf ¶
type OmitWhenKeySuffixIsNotOneOf []string
type OmitWhenKeySuffixIsNotOneOfIgnoringCase ¶
type OmitWhenKeySuffixIsNotOneOfIgnoringCase []string
type OmitWhenKeySuffixIsOneOf ¶
type OmitWhenKeySuffixIsOneOf []string
type OmitWhenKeySuffixIsOneOfIgnoringCase ¶
type OmitWhenKeySuffixIsOneOfIgnoringCase []string
type OmitWhenValueMatchedByOneOfRegexps ¶
type OmitWhenValueMatchedByOneOfRegexps []string
type OmitWhenValueMatchedByOneOfRegexpsIgnoringCase ¶
type OmitWhenValueMatchedByOneOfRegexpsIgnoringCase []string
type OmitWhenValueNotMatchedByOneOfRegexps ¶
type OmitWhenValueNotMatchedByOneOfRegexps []string
type OmitWhenValueNotMatchedByOneOfRegexpsIgnoringCase ¶
type OmitWhenValueNotMatchedByOneOfRegexpsIgnoringCase []string
type OmitWhenValuePassedToFuncReturnsFalse ¶
type OmitWhenValuePassedToFuncReturnsFalse []MatchFunc1
type OmitWhenValuePassedToFuncReturnsFalseIgnoringCase ¶
type OmitWhenValuePassedToFuncReturnsFalseIgnoringCase []MatchFunc1
type OmitWhenValuePassedToFuncReturnsTrue ¶
type OmitWhenValuePassedToFuncReturnsTrue []MatchFunc1
type OmitWhenValuePassedToFuncReturnsTrueIgnoringCase ¶
type OmitWhenValuePassedToFuncReturnsTrueIgnoringCase []MatchFunc1
type ValuesGetter ¶
type ValuesGetter interface {
Values() []string
}
Click to show internal directories.
Click to hide internal directories.