Documentation ¶
Index ¶
- func DefaultParseBool(c Clause) (bool, error)
- func DefaultParseInt(c Clause) (int64, error)
- func DefaultParseRegexp(c Clause) (*regexp.Regexp, error)
- func DefaultParseString(c Clause) (string, error)
- func DefaultParseUint(c Clause) (uint64, error)
- func Match(obj any, set ClauseSet) (bool, error)
- func ValueOf(obj any, field string) any
- type Clause
- type ClauseSet
- type OperatorSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultParseBool ¶
DefaultParseBool converts the value of the clause to boolean.
func DefaultParseInt ¶
DefaultParseInt converts the value of the clause to int64.
func DefaultParseRegexp ¶
DefaultParseRegexp converts the value of the clause to regexp.
func DefaultParseString ¶
DefaultParseString converts the value of the clause to string.
func DefaultParseUint ¶
DefaultParseUint converts the value of the clause to Uint64.
Types ¶
type ClauseSet ¶
type ClauseSet struct { Clauses []Clause Ops OperatorSet ParseInt func(Clause) (int64, error) ParseUint func(Clause) (uint64, error) ParseString func(Clause) (string, error) ParseBool func(Clause) (bool, error) ParseRegexp func(Clause) (*regexp.Regexp, error) }
ClauseSet is a set of clauses. There are configurable functions that can be used to perform unique parsing of the clauses.
type OperatorSet ¶
type OperatorSet struct { And string Or string Equals string NotEquals string GreaterThan string LessThan string GreaterEqual string LessEqual string Negate string Quote []string }
OperatorSet is represents the types of operators and symbols that a filter can support.
func QueryOperatorSet ¶
func QueryOperatorSet() OperatorSet
QueryOperatorSet returns the default operator set for LXD API queries.
Click to show internal directories.
Click to hide internal directories.