github.com/TeaOSLab/EdgeNode@v1.3.8/internal/waf/rule_operator.go (about) 1 package waf 2 3 type RuleOperator = string 4 type RuleCaseInsensitive = string 5 6 const ( 7 RuleOperatorGt RuleOperator = "gt" 8 RuleOperatorGte RuleOperator = "gte" 9 RuleOperatorLt RuleOperator = "lt" 10 RuleOperatorLte RuleOperator = "lte" 11 RuleOperatorEq RuleOperator = "eq" 12 RuleOperatorNeq RuleOperator = "neq" 13 RuleOperatorEqString RuleOperator = "eq string" 14 RuleOperatorNeqString RuleOperator = "neq string" 15 RuleOperatorMatch RuleOperator = "match" 16 RuleOperatorNotMatch RuleOperator = "not match" 17 RuleOperatorWildcardMatch RuleOperator = "wildcard match" 18 RuleOperatorWildcardNotMatch RuleOperator = "wildcard not match" 19 RuleOperatorContains RuleOperator = "contains" 20 RuleOperatorNotContains RuleOperator = "not contains" 21 RuleOperatorPrefix RuleOperator = "prefix" 22 RuleOperatorSuffix RuleOperator = "suffix" 23 RuleOperatorContainsAny RuleOperator = "contains any" 24 RuleOperatorContainsAll RuleOperator = "contains all" 25 RuleOperatorContainsAnyWord RuleOperator = "contains any word" 26 RuleOperatorContainsAllWords RuleOperator = "contains all words" 27 RuleOperatorNotContainsAnyWord RuleOperator = "not contains any word" 28 RuleOperatorContainsSQLInjection RuleOperator = "contains sql injection" 29 RuleOperatorContainsSQLInjectionStrictly RuleOperator = "contains sql injection strictly" 30 RuleOperatorContainsXSS RuleOperator = "contains xss" 31 RuleOperatorContainsXSSStrictly RuleOperator = "contains xss strictly" 32 RuleOperatorInIPList RuleOperator = "in ip list" 33 RuleOperatorHasKey RuleOperator = "has key" // has key in slice or map 34 RuleOperatorVersionGt RuleOperator = "version gt" 35 RuleOperatorVersionLt RuleOperator = "version lt" 36 RuleOperatorVersionRange RuleOperator = "version range" 37 38 RuleOperatorContainsBinary RuleOperator = "contains binary" // contains binary 39 RuleOperatorNotContainsBinary RuleOperator = "not contains binary" // not contains binary 40 41 // ip 42 43 RuleOperatorEqIP RuleOperator = "eq ip" 44 RuleOperatorGtIP RuleOperator = "gt ip" 45 RuleOperatorGteIP RuleOperator = "gte ip" 46 RuleOperatorLtIP RuleOperator = "lt ip" 47 RuleOperatorLteIP RuleOperator = "lte ip" 48 RuleOperatorIPRange RuleOperator = "ip range" 49 RuleOperatorNotIPRange RuleOperator = "not ip range" 50 RuleOperatorIPMod10 RuleOperator = "ip mod 10" 51 RuleOperatorIPMod100 RuleOperator = "ip mod 100" 52 RuleOperatorIPMod RuleOperator = "ip mod" 53 ) 54 55 type RuleOperatorDefinition struct { 56 Name string 57 Code string 58 Description string 59 CaseInsensitive RuleCaseInsensitive // default caseInsensitive setting 60 }