report

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package report package

Index

Constants

This section is empty.

Variables

View Source
var Handler interface{}

Handler interface

Functions

func Init

func Init(fname string)

Init called once per execution

func Record

func Record(in interface{}, policyName string) error

Record called once per policy

func Render

func Render(out string) error

Render called finaly to render the report

func SectEnd

func SectEnd() error

SectEnd called once per container image at the end

func Start

func Start(img *image.Info, options common.Options, currentVersion string) error

Start called once per container image at the start

Types

type Col

type Col struct {
	Name string
}

Col column of the table

type HTMLReport

type HTMLReport struct {
	RecordCnt *int
	// contains filtered or unexported fields
}

HTMLReport Report in HTML format

func NewHTMLReport

func NewHTMLReport() HTMLReport

NewHTMLReport instantiation on new html report

func (HTMLReport) Record

func (r HTMLReport) Record(ms common.MatchSpec, policyName string) error

Record addition of new HTML table row

func (HTMLReport) Render

func (r HTMLReport) Render(out string) error

Render output the table

func (HTMLReport) SectionEnd

func (r HTMLReport) SectionEnd() error

SectionEnd end of section of the HTML table

func (HTMLReport) Start

func (r HTMLReport) Start(img *image.Info, outDir string, currentVersion string) error

Start of HTML report section

type HeaderInfo

type HeaderInfo struct {
	ReportTitle string
	DateTime    string
}

HeaderInfo HTML Header Info

type Info

type Info struct {
	Key string
	Val string
}

Info key val pair of the image info

type RecordInfo

type RecordInfo struct {
	RowID       string
	Rec         []Col
	Policy      string
	Description string
	PolicyType  string
	Refs        []common.Ref
}

RecordInfo new row information in table

type SectionInfo

type SectionInfo struct {
	HdrCols []Col
	ImgInfo []Info
}

SectionInfo Section information

type TextReport

type TextReport struct {
	// contains filtered or unexported fields
}

TextReport Report in Text format

func NewTextReport

func NewTextReport() TextReport

NewTextReport instantiation of new TextReport

func (TextReport) Record

func (r TextReport) Record(ms common.MatchSpec, policyName string) error

Record addition of new text table row

func (TextReport) Render

func (r TextReport) Render(out string) error

Render output the table

func (TextReport) SectionEnd

func (r TextReport) SectionEnd() error

SectionEnd end of section of the text table

func (TextReport) Start

func (r TextReport) Start(img *image.Info, outDir string, currentVersion string) error

Start Start of the section of the text report

Jump to

Keyboard shortcuts

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