opa

package
v0.33.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 10 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OSUpgradeMap = map[string]string{
	"red hat enterprise linux 6": "Red Hat Enterprise Linux 7",
	"centos 7":                   "Red Hat Enterprise Linux 7",
	"centos 8":                   "Red Hat Enterprise Linux 8",
	"centos 9":                   "Red Hat Enterprise Linux 9",
	"amazon linux 2":             "Red Hat Enterprise Linux 8",
}

OSUpgradeMap maps unsupported operating systems to their recommended upgrade targets

Functions

func GetOSUpgradeConcern added in v0.5.0

func GetOSUpgradeConcern(osName string) *models.Concern

GetOSUpgradeConcern returns an OS upgrade recommendation concern for models.VM if applicable. Returns nil if the OS is not in the upgrade map.

Types

type PolicyReader

type PolicyReader struct{}

PolicyReader Handle policy discovery and file reading

func NewPolicyReader

func NewPolicyReader() *PolicyReader

func (*PolicyReader) ReadPolicies

func (pr *PolicyReader) ReadPolicies(policiesDir string) (map[string]string, error)

ReadPolicies Read all .rego policy files from the specified directory

type Validator

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

Validator handles policy compilation and validation

func NewValidator

func NewValidator(policies map[string]string) (*Validator, error)

func NewValidatorFromDir

func NewValidatorFromDir(policiesDir string) (*Validator, error)

func (*Validator) Validate added in v0.5.0

func (v *Validator) Validate(ctx context.Context, vm models.VM) ([]models.Concern, error)

Validate implements duckdb_parser.Validator for models.VM. This allows OPA validation to work directly with duckdb_parser models.

Jump to

Keyboard shortcuts

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