Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TypeMap = map[Type]interface{}{ Regex: struct{}{}, LessThan: struct{}{}, LessThanEqual: struct{}{}, GreaterThan: struct{}{}, GreaterThanEqual: struct{}{}, EqualTo: struct{}{}, NotEqualTo: struct{}{}, }
TypeMap contains all the expression types for validation.
Functions ¶
This section is empty.
Types ¶
type Expression ¶
Expression the expression interface
func MakeExpression ¶
func MakeExpression(expressionType Type, expressionSearchStr string, target interface{}) (exp Expression, err error)
MakeExpression creates an expression based on an expression type
type Type ¶
type Type string
Type is the type of the filter (i.e. const, regex, etc)
const ( // EqualTo a filter that applies numerical and string equal to operations EqualTo Type = "equal" // Regex a filter that applies regex rules to the matching Regex Type = "regex" // LessThan a filter that applies numerical less than operation LessThan Type = "less-than" // LessThanEqual a filter that applies numerical less than or equal operation LessThanEqual Type = "less-than-equal" // GreaterThan a filter that applies numerical greater than operation GreaterThan Type = "greater-than" // GreaterThanEqual a filter that applies numerical greater than or equal operation GreaterThanEqual Type = "greater-than-equal" // NotEqualTo a filter that applies numerical NOT equal to operation NotEqualTo Type = "not-equal" )
Click to show internal directories.
Click to hide internal directories.