Documentation
¶
Overview ¶
The ops package provides a set of functions that can be used to build a filter AST programatically using basic functions, versus building a filter AST leveraging all structural components of the tree.
Index ¶
- func And(node, next ast.FilterNode, others ...ast.FilterNode) ast.FilterNode
- func Contains[T ~string](field T, value string) ast.FilterNode
- func ContainsPrefix[T ~string](field T, value string) ast.FilterNode
- func ContainsSuffix[T ~string](field T, value string) ast.FilterNode
- func Eq[T ~string](field T, value string) ast.FilterNode
- func Not(node ast.FilterNode) ast.FilterNode
- func NotContains[T ~string](field T, value string) ast.FilterNode
- func NotContainsPrefix[T ~string](field T, value string) ast.FilterNode
- func NotContainsSuffix[T ~string](field T, value string) ast.FilterNode
- func NotEq[T ~string](field T, value string) ast.FilterNode
- func Or(node, next ast.FilterNode, others ...ast.FilterNode) ast.FilterNode
- type KeyedFieldType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func And ¶
func And(node, next ast.FilterNode, others ...ast.FilterNode) ast.FilterNode
func ContainsPrefix ¶
func ContainsPrefix[T ~string](field T, value string) ast.FilterNode
func ContainsSuffix ¶
func ContainsSuffix[T ~string](field T, value string) ast.FilterNode
func Not ¶
func Not(node ast.FilterNode) ast.FilterNode
func NotContains ¶
func NotContains[T ~string](field T, value string) ast.FilterNode
func NotContainsPrefix ¶
func NotContainsPrefix[T ~string](field T, value string) ast.FilterNode
func NotContainsSuffix ¶
func NotContainsSuffix[T ~string](field T, value string) ast.FilterNode
func Or ¶
func Or(node, next ast.FilterNode, others ...ast.FilterNode) ast.FilterNode
Types ¶
type KeyedFieldType ¶
type KeyedFieldType string
KeyedFieldType is a type alias for field is a special field type that can be deconstructed into multiple components.
func WithKey ¶
func WithKey[T ~string](field T, key string) KeyedFieldType
func (KeyedFieldType) Field ¶
func (k KeyedFieldType) Field() string
func (KeyedFieldType) Key ¶
func (k KeyedFieldType) Key() string
func (KeyedFieldType) Type ¶
func (k KeyedFieldType) Type() string
Click to show internal directories.
Click to hide internal directories.