Documentation
¶
Index ¶
- func ComparatorTypeStrings() []string
- func NodeFilterExecute(q NodeFilter, ao *engine.Objects) *engine.Objects
- type AndQuery
- type BinaryAndModifier
- type BinaryOrModifier
- type Comparator
- type ComparatorType
- type CountModifier
- type EdgeQuery
- type FilterAnyAttribute
- type FilterAttribute
- type FilterMultipleAttributes
- type FilterObjectType
- type FilterOneAttribute
- type HasAttr
- type HasGlobMatch
- type HasRegexpMatch
- type HasStringMatch
- type IndexSelectorInfo
- type LengthModifier
- type Limit
- type LowerStringAttribute
- type NodeFilter
- type NotQuery
- type OrQuery
- type Random100
- type RecursiveDNmatcher
- type SinceModifier
- type TimediffModifier
- type TypedComparison
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparatorTypeStrings ¶
func ComparatorTypeStrings() []string
ComparatorTypeStrings returns a slice of all String values of the enum
func NodeFilterExecute ¶
func NodeFilterExecute(q NodeFilter, ao *engine.Objects) *engine.Objects
Semi optimized way of executing a node filter
Types ¶
type AndQuery ¶
type AndQuery struct {
Subitems []NodeFilter
}
func (AndQuery) ToLDAPFilter ¶
func (AndQuery) ToWhereClause ¶
type BinaryAndModifier ¶
type BinaryAndModifier struct {
Value int64
}
func (BinaryAndModifier) ToLDAPFilter ¶
func (am BinaryAndModifier) ToLDAPFilter(a string) string
func (BinaryAndModifier) ToWhereClause ¶
func (am BinaryAndModifier) ToWhereClause(a string) string
type BinaryOrModifier ¶
type BinaryOrModifier struct {
Value int64
}
func (BinaryOrModifier) ToLDAPFilter ¶
func (om BinaryOrModifier) ToLDAPFilter(a string) string
func (BinaryOrModifier) ToWhereClause ¶
func (om BinaryOrModifier) ToWhereClause(a string) string
type Comparator ¶
type Comparator[t cmp.Ordered] ComparatorType
func (Comparator[t]) Compare ¶
func (c Comparator[t]) Compare(a, b t) bool
func (Comparator[t]) String ¶
func (c Comparator[t]) String() string
type ComparatorType ¶
type ComparatorType byte
type ObjectStrings interface { Strings(o *engine.Object) []string }
type ObjectInt interface { Int(o *engine.Object) (int64, bool) }
const ( CompareInvalid ComparatorType = iota CompareEquals CompareLessThan CompareLessThanEqual CompareGreaterThan CompareGreaterThanEqual )
func ComparatorTypeString ¶
func ComparatorTypeString(s string) (ComparatorType, error)
ComparatorTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ComparatorTypeValues ¶
func ComparatorTypeValues() []ComparatorType
ComparatorTypeValues returns all values of the enum
func (ComparatorType) IsAComparatorType ¶
func (i ComparatorType) IsAComparatorType() bool
IsAComparatorType returns "true" if the value is listed in the enum definition. "false" otherwise
func (ComparatorType) String ¶
func (i ComparatorType) String() string
type CountModifier ¶
type CountModifier struct { Comparator ComparatorType Value int }
func (CountModifier) ToLDAPFilter ¶
func (cm CountModifier) ToLDAPFilter(a string) string
func (CountModifier) ToWhereClause ¶
func (cm CountModifier) ToWhereClause(a string) string
type EdgeQuery ¶
type EdgeQuery struct { Target NodeFilter Direction engine.EdgeDirection Edge engine.Edge }
func (EdgeQuery) ToLDAPFilter ¶
func (EdgeQuery) ToWhereClause ¶
type FilterAnyAttribute ¶
type FilterAnyAttribute struct {
Attribute FilterAttribute
}
Wraps any attribute around a queryattribute interface
func (FilterAnyAttribute) ToLDAPFilter ¶
func (qaa FilterAnyAttribute) ToLDAPFilter() string
func (FilterAnyAttribute) ToWhereClause ¶
func (qaa FilterAnyAttribute) ToWhereClause() string
type FilterAttribute ¶
type FilterMultipleAttributes ¶
type FilterMultipleAttributes struct { FilterAttribute FilterAttribute AttributeGlobString string Attributes []engine.Attribute }
Wraps one Attribute around a queryattribute interface
func (FilterMultipleAttributes) Evaluate ¶
func (qma FilterMultipleAttributes) Evaluate(o *engine.Object) bool
func (FilterMultipleAttributes) ToLDAPFilter ¶
func (qma FilterMultipleAttributes) ToLDAPFilter() string
func (FilterMultipleAttributes) ToWhereClause ¶
func (qma FilterMultipleAttributes) ToWhereClause() string
type FilterObjectType ¶
type FilterObjectType struct {
// contains filtered or unexported fields
}
func (FilterObjectType) ToLDAPFilter ¶
func (fot FilterObjectType) ToLDAPFilter() string
func (FilterObjectType) ToWhereClause ¶
func (fot FilterObjectType) ToWhereClause() string
type FilterOneAttribute ¶
type FilterOneAttribute struct { FilterAttribute FilterAttribute Attribute engine.Attribute }
Wraps one Attribute around a queryattribute interface
func (FilterOneAttribute) ToLDAPFilter ¶
func (qoa FilterOneAttribute) ToLDAPFilter() string
func (FilterOneAttribute) ToWhereClause ¶
func (qoa FilterOneAttribute) ToWhereClause() string
type HasGlobMatch ¶
func (HasGlobMatch) ToLDAPFilter ¶
func (hgm HasGlobMatch) ToLDAPFilter(a string) string
func (HasGlobMatch) ToWhereClause ¶
func (hgm HasGlobMatch) ToWhereClause(a string) string
type HasRegexpMatch ¶
func (HasRegexpMatch) ToLDAPFilter ¶
func (hrm HasRegexpMatch) ToLDAPFilter(a string) string
func (HasRegexpMatch) ToWhereClause ¶
func (hrm HasRegexpMatch) ToWhereClause(a string) string
type HasStringMatch ¶
type HasStringMatch struct { Value engine.AttributeValueString Casesensitive bool }
func (HasStringMatch) ToLDAPFilter ¶
func (hsm HasStringMatch) ToLDAPFilter(a string) string
func (HasStringMatch) ToWhereClause ¶
func (hsm HasStringMatch) ToWhereClause(a string) string
type IndexSelectorInfo ¶
type IndexSelectorInfo struct {
// contains filtered or unexported fields
}
type LengthModifier ¶
type LengthModifier struct { Comparator ComparatorType Value int }
func (LengthModifier) ToLDAPFilter ¶
func (lm LengthModifier) ToLDAPFilter(a string) string
func (LengthModifier) ToWhereClause ¶
func (lm LengthModifier) ToWhereClause(a string) string
type Limit ¶
type Limit struct {
Counter int64
}
func (*Limit) ToLDAPFilter ¶
func (*Limit) ToWhereClause ¶
type LowerStringAttribute ¶
type NodeFilter ¶
type NodeFilter interface { Evaluate(o *engine.Object) bool ToLDAPFilter() string ToWhereClause() string }
func ParseLDAPQuery ¶
func ParseLDAPQueryStrict ¶
func ParseLDAPQueryStrict(s string, ao *engine.Objects) (NodeFilter, error)
type NotQuery ¶
type NotQuery struct {
Subitem NodeFilter
}
func (NotQuery) ToLDAPFilter ¶
func (NotQuery) ToWhereClause ¶
type OrQuery ¶
type OrQuery struct {
Subitems []NodeFilter
}
func (OrQuery) ToLDAPFilter ¶
func (OrQuery) ToWhereClause ¶
type Random100 ¶
type Random100 struct { Comparator ComparatorType Value int64 }
func (Random100) ToLDAPFilter ¶
func (Random100) ToWhereClause ¶
type RecursiveDNmatcher ¶
func (RecursiveDNmatcher) ToLDAPFilter ¶
func (rdn RecursiveDNmatcher) ToLDAPFilter(a string) string
func (RecursiveDNmatcher) ToWhereClause ¶
func (rdn RecursiveDNmatcher) ToWhereClause(a string) string
type SinceModifier ¶
type SinceModifier struct { TimeSpan *timespan.Timespan Comparator ComparatorType }
func (SinceModifier) ToLDAPFilter ¶
func (sm SinceModifier) ToLDAPFilter(a string) string
func (SinceModifier) ToWhereClause ¶
func (sm SinceModifier) ToWhereClause(a string) string
type TimediffModifier ¶
type TimediffModifier struct { TimeSpan *timespan.Timespan Attribute2 engine.Attribute Comparator ComparatorType }
func (TimediffModifier) ToLDAPFilter ¶
func (td TimediffModifier) ToLDAPFilter(a string) string
func (TimediffModifier) ToWhereClause ¶
func (td TimediffModifier) ToWhereClause(a string) string
type TypedComparison ¶
type TypedComparison[t cmp.Ordered] struct { Value t Comparator ComparatorType }
func (TypedComparison[t]) ToLDAPFilter ¶
func (tc TypedComparison[t]) ToLDAPFilter(a string) string
func (TypedComparison[t]) ToWhereClause ¶
func (tc TypedComparison[t]) ToWhereClause(a string) string
Click to show internal directories.
Click to hide internal directories.