Documentation
¶
Overview ¶
Package exprreader compiles YAML and JSON rule documents into rules.RuleSet values.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidRuleDocument reports malformed YAML/JSON or schema validation. ErrInvalidRuleDocument = errors.New("exprreader rule document is invalid") // ErrInvalidRuleExpression reports expression parse, compile, or type-check failure. ErrInvalidRuleExpression = errors.New("exprreader rule expression is invalid") // ErrInvalidRuleAction reports unsupported or invalid declarative actions. ErrInvalidRuleAction = errors.New("exprreader rule action is invalid") )
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
// Rules contains compiled rules in deterministic RuleSet order.
Rules *rules.RuleSet
// EngineConfig contains the optional sequential engine configuration.
EngineConfig rules.EngineConfig
}
Document is the compiled representation of a rule reader document.
type Option ¶
type Option func(*config)
Option configures document loading.
func WithMaxNodes ¶
WithMaxNodes sets the maximum expression AST node count accepted at compile time.
type ReaderError ¶
ReaderError wraps reader failures with optional rule and field context.
func (ReaderError) Error ¶
func (e ReaderError) Error() string
Error returns a human-readable reader error.
func (ReaderError) Unwrap ¶
func (e ReaderError) Unwrap() error
Unwrap returns the underlying reader failure.
Click to show internal directories.
Click to hide internal directories.