definition

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JSONReport string = "json"
	YAMLReport string = "yaml"
)

Variables

This section is empty.

Functions

func ValidateDefinition

func ValidateDefinition(ctx context.Context, fpath string, sources []source.PolicySource, namespace []string) (*output.Output, error)

ValidatePipeline calls NewPipelineEvaluator to obtain an PipelineEvaluator. It then executes the associated TestRunner which tests the associated pipeline file(s) against the associated policies, and displays the output.

Types

type Report

type Report struct {
	Definitions []ReportItem `json:"definitions"`
	Success     bool         `json:"success"`
	EcVersion   string       `json:"ec-version"`
}

func NewReport

func NewReport() Report

func (*Report) Add

func (r *Report) Add(o output.Output)

func (*Report) Write

func (r *Report) Write(targetName string, p format.TargetParser) error

type ReportFormat

type ReportFormat string

type ReportItem

type ReportItem struct {
	Filename   string             `json:"filename"`
	Violations []evaluator.Result `json:"violations"`
	Warnings   []evaluator.Result `json:"warnings"`
	Successes  []evaluator.Result `json:"successes"`
}

Jump to

Keyboard shortcuts

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