Versions in this module Expand all Collapse all v0 v0.1.1 Oct 9, 2026 v0.1.0 Oct 8, 2026 Changes in this version + const DefaultMaxIteratorItems + const DefaultMaxTuples + const DefaultTimeout + func Compact(tuples []language.Tuple) ([]language.Tuple, error) + type Category string + const CategoryConflict + const CategoryEval + const CategoryUnknown + const CategoryValidation + type Compiler struct + func NewCompiler(opts ...Option) *Compiler + func (c *Compiler) Compile(data []byte) (*Mapping, error) + func (c *Compiler) CompileFile(path string) (*Mapping, error) + func (c *Compiler) CompileReader(r io.Reader) (*Mapping, error) + func (c *Compiler) Err() error + type Conflict struct + Object string + Relation string + User string + type ConflictError struct + Condition string + Kind ConflictKind + func (e *ConflictError) Error() string + type ConflictKind int + const ConflictCompetingWrites + const ConflictWriteDelete + type Diagnostic struct + Category Category + Field string + Message string + Position language.Position + Severity Severity + type Diagnostics []Diagnostic + func DiagnosticsFrom(err error) Diagnostics + func (d Diagnostics) String() string + type EvalError struct + Err error + Expression string + Field string + Position language.Position + RuleName string + func (e *EvalError) Error() string + func (e *EvalError) Unwrap() error + type FilteredTestRun struct + Filtered int + Results []TestResult + Skipped int + func (r FilteredTestRun) NotRun() int + func (r FilteredTestRun) Stopped() bool + type Mapping struct + func Compile(src []byte, opts ...Option) (*Mapping, error) + func (m *Mapping) Evaluate(ctx context.Context, event map[string]any) (*Result, error) + func (m *Mapping) RuleCount() int + func (m *Mapping) Rules() []RuleSummary + func (m *Mapping) RunTests(ctx context.Context) []TestResult + func (m *Mapping) RunTestsFiltered(ctx context.Context, filter string, failFast bool) FilteredTestRun + func (m *Mapping) TestCount() int + func (m *Mapping) Version() string + type Option func(*Compiler) + func WithMaxIteratorItems(n int) Option + func WithMaxRules(n int) Option + func WithMaxTuples(n int) Option + func WithTimeout(d time.Duration) Option + func WithTrace(enabled bool) Option + type Position = language.Position + type PostProcessResult struct + Conflicts []Conflict + RemovedTuples []Tuple + type Result struct + Trace *Trace + TupleFilterOperations []TupleFilterOperation + Tuples []Tuple + type RuleStatus string + const RuleErrored + const RuleMatched + const RuleSkipped + type RuleSummary struct + IteratorTuples []TupleTemplate + Name string + TupleFilters []TupleFilterTemplate + Tuples []TupleTemplate + type RuleTrace struct + EmittedN int + Error error + FilterN int + Name string + Status RuleStatus + type Severity string + const SeverityError + type TestResult struct + Actual []language.Tuple + ActualTupleFilters []language.TupleFilter + Duration time.Duration + Error error + Expected []language.Tuple + ExpectedTupleFilters []language.TupleFilter + Input map[string]any + Name string + Passed bool + Trace *Trace + type Trace struct + Duration time.Duration + PostProcess *PostProcessResult + Rules []RuleTrace + type Tuple = language.Tuple + type TupleFilter = language.TupleFilter + type TupleFilterOperation struct + Filters []TupleFilter + Tuples []Tuple + type TupleFilterTemplate struct + Object string + Relation string + User string + type TupleTemplate struct + Condition string + Context map[string]string + Object string + Relation string + User string + type ValidationError = language.ValidationError