reporting

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(source string, sources []string) bool

Types

type Filter

type Filter struct {
	Namespaces   []string
	Policies     []string
	ClusterScope bool
}

func (Filter) IncludesNamespace

func (f Filter) IncludesNamespace(namespace string) bool

func (Filter) IncludesPolicy

func (f Filter) IncludesPolicy(policy string) bool

type Group

type Group struct {
	Name    string
	Policy  *Policy
	Summary *Summary
	Rules   map[string]*Rule
}

type Policy

type Policy struct {
	Title       string
	Category    string
	Description string
	Severity    string
}

type PolicyReportGenerator

type PolicyReportGenerator interface {
	PerPolicyData(ctx context.Context, filter Filter) ([]*Validation, error)
	PerNamespaceData(ctx context.Context, filter Filter) ([]*Validation, error)
}

func NewPolicyReportGenerator

func NewPolicyReportGenerator(policyClient *kubernetes.PolicyClient, reportClient *kubernetes.ReportClient) PolicyReportGenerator

type Resource

type Resource struct {
	Kind       string
	APIVersion string
	Name       string
	Status     string
}

type Rule

type Rule struct {
	Summary   *Summary
	Resources []*Resource
}

type Summary

type Summary struct {
	Error   int
	Pass    int
	Fail    int
	Warning int
}

type Validation

type Validation struct {
	Name   string
	Policy *Policy
	Groups map[string]*Group
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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