policy

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package policy handles policy matching and evaluation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EvaluationResult

type EvaluationResult struct {
	Violations []domain.Violation
	Passed     bool // True if no error/critical violations
}

EvaluationResult holds the outcome of evaluating rules against evidence.

func Evaluate

func Evaluate(rules []domain.PolicyRule, ev []domain.Evidence) EvaluationResult

Evaluate checks policy rules against collected evidence.

type Matcher

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

Matcher determines which policy packs apply to a given unit.

func NewMatcher

func NewMatcher(packs []domain.PolicyPack) *Matcher

NewMatcher creates a new policy matcher.

func (*Matcher) Match

func (m *Matcher) Match(unit domain.Unit) []domain.PolicyPack

Match returns the policy packs that apply to the given unit.

Jump to

Keyboard shortcuts

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