Documentation ¶
Index ¶
- Constants
- Variables
- func Black(s string) string
- func Blue(s string) string
- func Colorize(s string, c Color) string
- func ColorizeForLevel(l conf.Level, s string) string
- func ColorizeForScore(score int, s string) string
- func Cyan(s string) string
- func EmojiForLevel(l conf.Level) string
- func Green(s string) string
- func HiBlack(s string) string
- func HiBlue(s string) string
- func HiCyan(s string) string
- func HiGreen(s string) string
- func HiMagenta(s string) string
- func HiRed(s string) string
- func HiWhite(s string) string
- func HiYellow(s string) string
- func Magenta(s string) string
- func Red(s string) string
- func White(s string) string
- func Yellow(s string) string
- type Color
- type Report
- type ReportWriter
- type Reporter
- type Section
- type Sections
Constants ¶
View Source
const (
// Width the maximum width of the report.
Width = 100
)
Variables ¶
View Source
var HawkEyeLogo = []string{
` ___ ___ __ ___________ `,
` / | \_____ __ _ _| | __\_ _____/__.__. ____ `,
`/ ~ \__ \\ \/ \/ / |/ / | __)< | |/ __ \ `,
`\ Y // __ \\ /| < | \___ \ ___/ `,
` \___|_ /(____ /\/\_/ |__|_ \/_______ / ____|\___ > `,
` \/ \/ \/ \/\/ \/ `,
}
HawkEye logo
Functions ¶
func ColorizeForLevel ¶
Colorize a string for level.
func ColorizeForScore ¶
Colorize a string for score.
Types ¶
type Report ¶
type Report struct { Score int `json:"score" yaml:"score"` Grade string `json:"grade" yaml:"grade"` Sections Sections `json:"sections,omitempty" yaml:"sections,omitempty"` }
Report represents the output of a sanitization pass.
type ReportWriter ¶
ReportWriter report writer.
func NewReportWriter ¶
func NewReportWriter(w io.Writer) *ReportWriter
NewReportWriter returns a new report writer.
func (*ReportWriter) Open ¶
func (r *ReportWriter) Open(msg string)
Open begins a new report section.
type Reporter ¶
Reporter represents reporter
func (*Reporter) AddSections ¶
AddSections add report section
func (*Reporter) MergeSections ¶
func (r *Reporter) MergeSections()
MergeSections merge section by group
func (*Reporter) PrintSections ¶
func (r *Reporter) PrintSections()
PrintReport prints section (kubernetes resource) report
Click to show internal directories.
Click to hide internal directories.