engine

package
v0.3.0-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine evaluates a ClassifyRequest against one or more regime packs.

func Default

func Default() (*Engine, error)

Default builds an engine with the embedded EU AI Act ruleset only.

func New

func New(set *ruleset.Set) *Engine

New builds a single-pack engine (EU AI Act when set comes from LoadDefault).

func NewWithLoader

func NewWithLoader(loader *ruleset.Loader, defaultRegimes []string) (*Engine, error)

NewWithLoader builds a multi-pack engine. defaultRegimes is used when the request omits regimes (after CLI/API config resolution callers may still pass them on the request).

func (*Engine) Classify

Classify runs rule matching for the resolved regimes.

Backward compatible shape: the top-level risk_tier / matched_rules fields always reflect the first resolved regime. classifications[] is only filled when more than one regime was evaluated, so the historical EU-only JSON golden remains byte-identical.

type ValidationError

type ValidationError struct {
	Details []string
}

ValidationError lists request problems.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL