Documentation
¶
Overview ¶
Package output provides formatting options for scan results
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSVFormatter ¶
type CSVFormatter struct{}
CSVFormatter formats results as CSV
func (*CSVFormatter) Format ¶
func (f *CSVFormatter) Format(result *models.ScanResult) (string, error)
Format returns the formatted string
func (*CSVFormatter) Write ¶
func (f *CSVFormatter) Write(w io.Writer, result *models.ScanResult) error
Write writes the formatted output to the writer
type Formatter ¶
type Formatter interface {
Format(result *models.ScanResult) (string, error)
Write(w io.Writer, result *models.ScanResult) error
}
Formatter defines the interface for output formatters
func NewFormatter ¶
NewFormatter creates a new formatter based on the format type
type JSONFormatter ¶
type JSONFormatter struct {
Pretty bool
}
JSONFormatter formats results as JSON
func (*JSONFormatter) Format ¶
func (f *JSONFormatter) Format(result *models.ScanResult) (string, error)
Format returns the formatted string
func (*JSONFormatter) Write ¶
func (f *JSONFormatter) Write(w io.Writer, result *models.ScanResult) error
Write writes the formatted output to the writer
type TextFormatter ¶
type TextFormatter struct{}
TextFormatter formats results as human-readable text tables
func (*TextFormatter) Format ¶
func (f *TextFormatter) Format(result *models.ScanResult) (string, error)
Format returns the formatted string
func (*TextFormatter) Write ¶
func (f *TextFormatter) Write(w io.Writer, result *models.ScanResult) error
Write writes the formatted output to the writer
Click to show internal directories.
Click to hide internal directories.