report

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Fail  Status = "fail"
	Warn  Status = "warn"
	Error Status = "error"
	Pass  Status = "pass"
	Skip  Status = "skip"

	Low    Severity = "low"
	Medium Severity = "medium"
	Heigh  Severity = "heigh"

	Alert       Priority = "error"
	Warning     Priority = "warning"
	Information Priority = "info"
	Debug       Priority = "debug"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterPolicyReport

type ClusterPolicyReport struct {
	Name    string
	Results map[string]Result
	Summary Summary
}

func (ClusterPolicyReport) GetIdentifier

func (cr ClusterPolicyReport) GetIdentifier() string

func (ClusterPolicyReport) GetNewValidation

func (cr ClusterPolicyReport) GetNewValidation(cor ClusterPolicyReport) []Result

type PolicyReport

type PolicyReport struct {
	Name      string
	Namespace string
	Results   map[string]Result
	Summary   Summary
}

func (PolicyReport) GetIdentifier

func (pr PolicyReport) GetIdentifier() string

func (PolicyReport) GetNewValidation

func (pr PolicyReport) GetNewValidation(or PolicyReport) []Result

type Priority

type Priority = string

type Report

type Report interface {
	GetIdentifier() string
}

type Resource

type Resource struct {
	APIVersion string
	Kind       string
	Name       string
	Namespace  string
	UID        string
}

type Result

type Result struct {
	Message   string
	Policy    string
	Rule      string
	Priority  Priority
	Status    Status
	Severity  Severity
	Category  string
	Scored    bool
	Resources []Resource
}

func (Result) GetIdentifier

func (r Result) GetIdentifier() string

type Severity

type Severity = string

type Status

type Status = string

type Summary

type Summary struct {
	Pass  int
	Skip  int
	Warn  int
	Error int
	Fail  int
}

Jump to

Keyboard shortcuts

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