d8f0f5a3a9
* debug expr in node.go * update documentation Co-authored-by: AlteredCoder <AlteredCoder> Co-authored-by: Thibault bui Koechlin <thibault@crowdsec.net>
24 lines
570 B
Go
24 lines
570 B
Go
package types
|
|
|
|
import (
|
|
"net"
|
|
|
|
"github.com/antonmedv/expr/vm"
|
|
"github.com/crowdsecurity/crowdsec/pkg/exprhelpers"
|
|
)
|
|
|
|
type Whitelist struct {
|
|
Reason string `yaml:"reason,omitempty"`
|
|
Ips []string `yaml:"ip,omitempty"`
|
|
B_Ips []net.IP
|
|
Cidrs []string `yaml:"cidr,omitempty"`
|
|
B_Cidrs []*net.IPNet
|
|
Exprs []string `yaml:"expression,omitempty"`
|
|
B_Exprs []*ExprWhitelist
|
|
}
|
|
|
|
type ExprWhitelist struct {
|
|
Filter *vm.Program
|
|
ExprDebugger *exprhelpers.ExprDebugger // used to debug expression by printing the content of each variable of the expression
|
|
}
|