scan

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Command

func Command() *cobra.Command

Types

type ErrorReport

type ErrorReport struct {
	Type   string `json:"type,omitempty"`
	Field  string `json:"field,omitempty"`
	Value  any    `json:"value,omitempty"`
	Detail string `json:"detail,omitempty"`
}

type PolicyReport

type PolicyReport struct {
	Policy *v1alpha1.ValidatingPolicy `json:"policy"`
	Rules  []RuleReport               `json:"rules,omitempty"`
}

type Report

type Report struct {
	Resource any            `json:"resource"`
	Results  []PolicyReport `json:"results,omitempty"`
}

func ToReport

func ToReport(response jsonengine.Response) Report

func ToReports

func ToReports(responses ...jsonengine.Response) (reports []Report)

type RuleReport

type RuleReport struct {
	Rule       v1alpha1.ValidatingRule `json:"rule"`
	Identifier string                  `json:"identifier,omitempty"`
	Error      string                  `json:"error,omitempty"`
	Violations []ViolationReport       `json:"violations,omitempty"`
}

type ViolationReport

type ViolationReport struct {
	Message string        `json:"message,omitempty"`
	Errors  []ErrorReport `json:"errors,omitempty"`
}

Jump to

Keyboard shortcuts

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