Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONReporter ¶
type JSONReporter struct {
// contains filtered or unexported fields
}
func NewJSONReporter ¶
func NewJSONReporter(stdout io.Writer, stderr io.Writer) *JSONReporter
func (*JSONReporter) HasPrintedError ¶
func (r *JSONReporter) HasPrintedError() bool
func (*JSONReporter) PrintError ¶
func (r *JSONReporter) PrintError(msg string)
func (*JSONReporter) PrintResult ¶
func (r *JSONReporter) PrintResult(vulnResult *models.VulnerabilityResults) error
func (*JSONReporter) PrintText ¶
func (r *JSONReporter) PrintText(msg string)
type Reporter ¶
type Reporter interface {
// PrintError writes the given message to stderr, regardless of if the reporter
// is outputting as JSON or not
PrintError(msg string)
HasPrintedError() bool
// PrintText writes the given message to stdout, _unless_ the reporter is set
// to output as JSON, in which case it writes the message to stderr.
//
// This should be used for content that should always be outputted, but that
// should not be captured when piping if outputting JSON.
PrintText(msg string)
PrintResult(vulnResult *models.VulnerabilityResults) error
}
type TableReporter ¶
type TableReporter struct {
// contains filtered or unexported fields
}
func NewTableReporter ¶
func (*TableReporter) HasPrintedError ¶
func (r *TableReporter) HasPrintedError() bool
func (*TableReporter) PrintError ¶
func (r *TableReporter) PrintError(msg string)
func (*TableReporter) PrintResult ¶
func (r *TableReporter) PrintResult(vulnResult *models.VulnerabilityResults) error
func (*TableReporter) PrintText ¶
func (r *TableReporter) PrintText(msg string)
type VoidReporter ¶
type VoidReporter struct {
// contains filtered or unexported fields
}
func (*VoidReporter) HasPrintedError ¶
func (r *VoidReporter) HasPrintedError() bool
func (*VoidReporter) PrintError ¶
func (r *VoidReporter) PrintError(msg string)
func (*VoidReporter) PrintResult ¶
func (r *VoidReporter) PrintResult(vulnResult *models.VulnerabilityResults) error
func (*VoidReporter) PrintText ¶
func (r *VoidReporter) PrintText(msg string)
Click to show internal directories.
Click to hide internal directories.