Documentation
¶
Index ¶
- Variables
- func GetJqMatcher(obj *ObjT) (lm.MatchFunc, error)
- func GetLogInverseSeqMatcher(obj *ObjT) (*lm.InverseSeq, error)
- func GetLogSeqMatcher(obj *ObjT) (*lm.MatchSeq, error)
- func GetLogSingleMatcher(obj *ObjT) (*lm.MatchSingle, error)
- type AssertParamsT
- type CallbackT
- type CompilerOptT
- type DefaultPlugin
- type MatchParamsT
- type NoopRuntime
- type ObjT
- type ObjTypeT
- type ObjsT
- type PluginI
- type RuntimeI
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExpectedReteMatcher = errors.New("expected rete matcher") ErrExpectedJsonMatcher = errors.New("expected jq json matcher") ErrExpectedLogMatcher = errors.New("expected log matcher") ErrExpectedCbDetect = errors.New("expected detect callback") ErrInvalidCbArgs = errors.New("invalid callback arguments") ErrNotFound = errors.New("not found") )
Functions ¶
func GetLogInverseSeqMatcher ¶
func GetLogInverseSeqMatcher(obj *ObjT) (*lm.InverseSeq, error)
func GetLogSingleMatcher ¶
func GetLogSingleMatcher(obj *ObjT) (*lm.MatchSingle, error)
Types ¶
type AssertParamsT ¶
type AssertParamsT struct {
Address *ast.AstNodeAddressT
}
type CompilerOptT ¶
type CompilerOptT func(*compilerOptsT)
func WithDebugTree ¶
func WithDebugTree(path string) CompilerOptT
func WithPlugin ¶
func WithPlugin(scope string, plugin PluginI) CompilerOptT
func WithRuntime ¶
func WithRuntime(cb RuntimeI) CompilerOptT
type DefaultPlugin ¶ added in v0.0.17
type DefaultPlugin struct{}
func NewDefaultPlugin ¶ added in v0.0.17
func NewDefaultPlugin() *DefaultPlugin
type MatchParamsT ¶
type MatchParamsT struct {
Address *ast.AstNodeAddressT
ParentAddress *ast.AstNodeAddressT
Origin bool
}
type NoopRuntime ¶
type NoopRuntime struct{}
-----
func NewNoopRuntime ¶
func NewNoopRuntime() *NoopRuntime
func (*NoopRuntime) NewCbAssert ¶
func (f *NoopRuntime) NewCbAssert(params AssertParamsT) CallbackT
func (*NoopRuntime) NewCbMatch ¶
func (f *NoopRuntime) NewCbMatch(params MatchParamsT) CallbackT
type ObjT ¶
type ObjT struct {
RuleId string `json:"rule_id"`
Address *ast.AstNodeAddressT `json:"address"`
ParentAddress *ast.AstNodeAddressT `json:"parent_address"`
Scope string `json:"scope"`
AbstractType schema.NodeTypeT `json:"abstract_type"`
ObjectType ObjTypeT `json:"object_type"`
Event ast.AstEventT `json:"event"`
Object any `json:"object"`
Cb CallbackT `json:"cb"`
}
type RuntimeI ¶
type RuntimeI interface {
NewCbMatch(params MatchParamsT) CallbackT
NewCbAssert(params AssertParamsT) CallbackT
}
Click to show internal directories.
Click to hide internal directories.