clihelpers

package
v0.0.0-...-1878794 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package clihelpers holds common CLI helpers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPoliciesLocal

func CheckPoliciesLocal(args CheckPoliciesLocalParams, writer io.Writer) error

CheckPoliciesLocal checks the policies in a directory

func EvalRule

func EvalRule(evalArgs EvalRuleParams) error

EvalRule evaluates a rule against an event

Types

type CheckPoliciesLocalParams

type CheckPoliciesLocalParams struct {
	Dir                      string
	EvaluateAllPolicySources bool
	UseWindowsModel          bool
}

CheckPoliciesLocalParams are parameters to the CheckPoliciesLocal function

type EvalReport

type EvalReport struct {
	Succeeded bool
	Approvers map[string]rules.Approvers
	Event     eval.Event
	Error     error `json:",omitempty"`
}

EvalReport defines a report of an evaluation

type EvalRuleParams

type EvalRuleParams struct {
	Dir             string
	UseWindowsModel bool
	RuleID          string
	EventFile       string
}

EvalRuleParams are parameters to the EvalRule function

type TestData

type TestData struct {
	Type      eval.EventType
	Values    map[string]any
	Variables map[string]any
}

TestData defines the structure used to represent an event and its variables

Jump to

Keyboard shortcuts

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