evaluator

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFailedEvaluateExpression = errors.New("could not evaluate expression")

Functions

This section is empty.

Types

type EvaluationResult

type EvaluationResult struct {
	Target  *entity.TargetServer
	Allowed bool
	Found   bool
}

type RegoEvaluator added in v0.3.0

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

func NewRegoEvaluator

func NewRegoEvaluator(config *entity.Config, mac *entity.MacAddress, upsRepo repository.UPSRepository, ruleRepo repository.RuleRepository) *RegoEvaluator

NewRegoEvaluator creates a RegoEvaluator configured with the provided configuration, MAC address, UPS repository and rule repository. The returned evaluator uses the MAC to select matching targets, upsRepo to fetch per-server JSON input and ruleRepo to evaluate rules against that input.

func (*RegoEvaluator) EvaluateExpressions added in v0.3.0

func (r *RegoEvaluator) EvaluateExpressions() (*EvaluationResult, error)

Jump to

Keyboard shortcuts

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