engine

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package engine contains the interfaces necessary to implement policy execution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerPolicy

func ContainerPolicy(ctx context.Context) []string

ContainerPolicy returns the names of checks in the container policy.

func OperatorPolicy

func OperatorPolicy(ctx context.Context) []string

OperatorPolicy returns the names of checks in the operator policy.

func RootExceptionContainerPolicy

func RootExceptionContainerPolicy(ctx context.Context) []string

RootExceptionContainerPolicy returns the names of checks in the container policy with root exception.

func ScratchContainerPolicy

func ScratchContainerPolicy(ctx context.Context) []string

ScratchContainerPolicy returns the names of checks in the container policy with scratch exception.

Types

type CheckEngine

type CheckEngine interface {
	// ExecuteChecks should execute all checks in a policy and internally
	// store the results. Errors returned by ExecuteChecks should reflect
	// errors in pre-validation tasks, and not errors in individual check
	// execution itself.
	ExecuteChecks(context.Context) error
	// Results returns the outcome of executing all checks.
	Results(context.Context) runtime.Results
}

CheckEngine defines the functionality necessary to run all checks for a policy, and return the results of that check execution.

func NewForConfig

func NewForConfig(ctx context.Context, cfg certification.Config) (CheckEngine, error)

Jump to

Keyboard shortcuts

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