report

package
v0.0.0-...-d0c7a6b Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTMLFormatter

type HTMLFormatter struct {
	Template string
}

HTMLFormatter formats reports as HTML

func (*HTMLFormatter) Format

func (f *HTMLFormatter) Format(report types.AuditReport) ([]byte, error)

type JSONFormatter

type JSONFormatter struct {
	PrettyPrint bool
}

JSONFormatter formats reports as JSON

func (*JSONFormatter) Format

func (f *JSONFormatter) Format(report types.AuditReport) ([]byte, error)

type ReportFormatter

type ReportFormatter interface {
	Format(report types.AuditReport) ([]byte, error)
}

ReportFormatter handles report formatting

func GetFormatter

func GetFormatter(format string, prettyPrint bool) (ReportFormatter, error)

GetFormatter returns the appropriate formatter based on format string

type YAMLFormatter

type YAMLFormatter struct{}

YAMLFormatter formats reports as YAML

func (*YAMLFormatter) Format

func (f *YAMLFormatter) Format(report types.AuditReport) ([]byte, error)

Jump to

Keyboard shortcuts

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