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.
func (*Matcher) Packs ¶ added in v0.2.0
func (m *Matcher) Packs() []domain.PolicyPack
Packs returns all loaded policy packs.
Click to show internal directories.
Click to hide internal directories.