policy

package
v0.0.0-...-6340669 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Engine

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

Engine represents the policy engine.

func Load

func Load(policyPaths []string, dataPaths []string, trace bool) (*Engine, error)

Load returns an Engine after loading all of the specified policies and data paths.

func (*Engine) Check

func (e *Engine) Check(ctx context.Context, configs []types.Config, namespaces []string) ([]types.Misconfiguration, error)

Check executes all of the loaded policies against the input and returns the results.

func (*Engine) Compiler

func (e *Engine) Compiler() *ast.Compiler

Compiler returns the compiler from the loaded policies.

func (*Engine) Modules

func (e *Engine) Modules() map[string]*ast.Module

Modules returns the modules from the loaded policies.

func (*Engine) Runtime

func (e *Engine) Runtime() *ast.Term

Runtime returns the runtime of the engine.

func (*Engine) Store

func (e *Engine) Store() storage.Store

Store returns the store from the loaded documents.

Jump to

Keyboard shortcuts

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