templates

package
v0.15.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package templates provides code generated from *.qtpl templates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PageTemplate

func PageTemplate(p Page) string

func StreamPageTemplate

func StreamPageTemplate(qw422016 *qt422016.Writer, p Page)

func WritePageTemplate

func WritePageTemplate(qq422016 qtio422016.Writer, p Page)

Types

type CheckWithCount added in v0.10.0

type CheckWithCount struct {
	v1alpha1.Check
	AffectedWorkloads int
}

type NamespaceReport added in v0.10.0

type NamespaceReport struct {
	Namespace   kube.ObjectRef
	GeneratedAt time.Time

	Top5VulnerableImages []v1alpha1.VulnerabilityReport
	Top5FailedChecks     []CheckWithCount
	Top5Vulnerability    []VulnerabilityWithCount
}

NamespaceReport is a structure that holds data to render an HTML report for a specified K8s namespace.

func (*NamespaceReport) Body added in v0.10.0

func (p *NamespaceReport) Body() string

func (*NamespaceReport) StreamBody added in v0.10.0

func (p *NamespaceReport) StreamBody(qw422016 *qt422016.Writer)

func (*NamespaceReport) StreamTitle added in v0.10.0

func (p *NamespaceReport) StreamTitle(qw422016 *qt422016.Writer)

func (*NamespaceReport) Title added in v0.10.0

func (p *NamespaceReport) Title() string

func (*NamespaceReport) WriteBody added in v0.10.0

func (p *NamespaceReport) WriteBody(qq422016 qtio422016.Writer)

func (*NamespaceReport) WriteTitle added in v0.10.0

func (p *NamespaceReport) WriteTitle(qq422016 qtio422016.Writer)

type NodeReport added in v0.10.0

type NodeReport struct {
	Node        kube.ObjectRef
	GeneratedAt time.Time

	CisKubeBenchReport *v1alpha1.CISKubeBenchReport
}

NodeReport is a structure that holds data to render an HTML report for a specified K8s node.

func (*NodeReport) Body added in v0.10.0

func (p *NodeReport) Body() string

func (*NodeReport) StreamBody added in v0.10.0

func (p *NodeReport) StreamBody(qw422016 *qt422016.Writer)

func (*NodeReport) StreamTitle added in v0.10.0

func (p *NodeReport) StreamTitle(qw422016 *qt422016.Writer)

func (*NodeReport) Title added in v0.10.0

func (p *NodeReport) Title() string

func (*NodeReport) WriteBody added in v0.10.0

func (p *NodeReport) WriteBody(qq422016 qtio422016.Writer)

func (*NodeReport) WriteTitle added in v0.10.0

func (p *NodeReport) WriteTitle(qq422016 qtio422016.Writer)

type Page

type Page interface {
	Title() string

	StreamTitle(qw422016 *qt422016.Writer)

	WriteTitle(qq422016 qtio422016.Writer)

	Body() string

	StreamBody(qw422016 *qt422016.Writer)

	WriteBody(qq422016 qtio422016.Writer)
}

type VulnerabilityWithCount added in v0.10.0

type VulnerabilityWithCount struct {
	v1alpha1.Vulnerability
	AffectedWorkloads int
}

type WorkloadReport added in v0.10.0

type WorkloadReport struct {
	Workload    kube.ObjectRef
	GeneratedAt time.Time

	// FIXME Do not use map as the order of iteration is unpredictable.
	VulnsReports      map[string]v1alpha1.VulnerabilityReportData
	ConfigAuditReport *v1alpha1.ConfigAuditReport
}

WorkloadReport is a structure that holds data to render an HTML report for a specified K8s workload.

func (*WorkloadReport) Body added in v0.10.0

func (p *WorkloadReport) Body() string

func (*WorkloadReport) GetMergedVulnsSummary added in v0.10.0

func (p *WorkloadReport) GetMergedVulnsSummary() v1alpha1.VulnerabilitySummary

func (*WorkloadReport) StreamBody added in v0.10.0

func (p *WorkloadReport) StreamBody(qw422016 *qt422016.Writer)

func (*WorkloadReport) StreamTitle added in v0.10.0

func (p *WorkloadReport) StreamTitle(qw422016 *qt422016.Writer)

func (*WorkloadReport) Title added in v0.10.0

func (p *WorkloadReport) Title() string

func (*WorkloadReport) WriteBody added in v0.10.0

func (p *WorkloadReport) WriteBody(qq422016 qtio422016.Writer)

func (*WorkloadReport) WriteTitle added in v0.10.0

func (p *WorkloadReport) WriteTitle(qq422016 qtio422016.Writer)

Jump to

Keyboard shortcuts

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