rego

package
v0.118.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnvironmentMode added in v0.96.19

type EnvironmentMode int32

EnvironmentMode defines the mode of running the policy engine

const (
	// EnvironmentModeRestrictive restricts operations that the compiler can do
	EnvironmentModeRestrictive EnvironmentMode = 0
	// EnvironmentModePermissive allows all operations on the compiler
	EnvironmentModePermissive EnvironmentMode = 1
)

func (EnvironmentMode) Capabilities added in v0.96.19

func (em EnvironmentMode) Capabilities() *ast.Capabilities

Capabilities returns the capabilities of the environment based on the mode of operation defaulting to EnvironmentModeRestrictive if not provided.

type Rego

type Rego struct {
	// OperatingMode defines the mode of running the policy engine
	// by restricting or not the operations allowed by the compiler
	OperatingMode EnvironmentMode
}

Rego policy checker for chainloop attestations and materials

func (*Rego) Verify

func (r *Rego) Verify(ctx context.Context, policy *engine.Policy, input []byte, args map[string]any) (*engine.EvaluationResult, error)

Jump to

Keyboard shortcuts

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