Documentation ¶
Index ¶
- Constants
- func Match(fieldSelectorStr string, content interface{}, ...) (bool, error)
- type BoolSelector
- type FieldSelector
- type FieldType
- type Filter
- type MatchFunc
- type SelectorOperatorSymbol
- type StringSelector
- func (s *StringSelector) Eq(value reflect.Value, matchValue string) (bool, error)
- func (s *StringSelector) GetField() string
- func (s *StringSelector) GetMatchFunc(operatorSymbol string) (MatchFunc, error)
- func (s *StringSelector) In(value reflect.Value, matchValue string) (bool, error)
- func (s *StringSelector) NotEq(value reflect.Value, matchValue string) (bool, error)
- func (s *StringSelector) NotIn(value reflect.Value, matchValue string) (bool, error)
Constants ¶
View Source
const ( EqualOperator = "=" NotEqualOperator = "!=" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BoolSelector ¶
type BoolSelector struct {
// contains filtered or unexported fields
}
func NewBoolSelector ¶
func NewBoolSelector(field string, matchMode SelectorOperatorSymbol) *BoolSelector
func (*BoolSelector) GetField ¶
func (s *BoolSelector) GetField() string
func (*BoolSelector) GetMatchFunc ¶
func (s *BoolSelector) GetMatchFunc(operatorSymbol string) (MatchFunc, error)
type FieldSelector ¶
type Filter ¶
func ParseFilterFieldString ¶
type SelectorOperatorSymbol ¶
type SelectorOperatorSymbol string
const ( Eq SelectorOperatorSymbol = "Eq" NotEq SelectorOperatorSymbol = "NotEq" In SelectorOperatorSymbol = "In" NotIn SelectorOperatorSymbol = "NotIn" )
type StringSelector ¶
type StringSelector struct {
// contains filtered or unexported fields
}
func NewStringSelector ¶
func NewStringSelector(field string, matchMode SelectorOperatorSymbol) *StringSelector
TODO 增加operator操作符的入参
func (*StringSelector) GetField ¶
func (s *StringSelector) GetField() string
func (*StringSelector) GetMatchFunc ¶
func (s *StringSelector) GetMatchFunc(operatorSymbol string) (MatchFunc, error)
Click to show internal directories.
Click to hide internal directories.