reporting

package
v1.123.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 5 Imported by: 12

Documentation

Index

Constants

View Source
const (
	Green = iota + 1
	Yellow
	Red
	Grey
	Black
)

enum for style types

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnStyle

type ColumnStyle int

ColumnStyle defines style for a specific column

func (ColumnStyle) String

func (c ColumnStyle) String() string

type ScanCell

type ScanCell struct {
	Content string
	Style   ColumnStyle
}

ScanCell defines one column of a scan result table

type ScanDetailTable

type ScanDetailTable struct {
	Headers       []string
	Rows          []ScanRow
	WithCounter   bool
	CounterHeader string
	NoRowsMessage string
}

ScanDetailTable defines a table containing scan result details

type ScanReport

type ScanReport struct {
	Title       string
	Subheaders  []string
	Overview    []string
	FurtherInfo string
	ReportTime  time.Time
	DetailTable ScanDetailTable
}

ScanReport defines the elements of a scan report used by various scan steps

func (*ScanReport) ToHTML

func (s *ScanReport) ToHTML() ([]byte, error)

ToHTML creates a HTML version of the report

func (*ScanReport) ToMarkdown

func (s *ScanReport) ToMarkdown() string

ToMarkdown creates a markdown version of the report content

type ScanRow

type ScanRow struct {
	Columns []ScanCell
}

ScanRow defines one row of a scan result table

Jump to

Keyboard shortcuts

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