Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AvailableFormats = []Format{ JSONFormat, TableFormat, CycloneDXFormat, CycloneDXJSON, SarifFormat, TemplateFormat, }
AvailableFormats is a list of presenter format options available to users.
View Source
var DeprecatedFormats = []Format{ EmbeddedVEXJSON, EmbeddedVEXXML, }
DeprecatedFormats TODO: remove in v1.0
Functions ¶
func GetPresenter ¶ added in v0.64.0
func GetPresenter(format Format, c PresentationConfig, pb models.PresenterConfig) presenter.Presenter
GetPresenter retrieves a Presenter that matches a CLI option
Types ¶
type Format ¶ added in v0.64.0
type Format string
Format is a dedicated type to represent a specific kind of presenter output format.
const ( UnknownFormat Format = "unknown" JSONFormat Format = "json" TableFormat Format = "table" CycloneDXFormat Format = "cyclonedx" CycloneDXJSON Format = "cyclonedx-json" CycloneDXXML Format = "cyclonedx-xml" SarifFormat Format = "sarif" TemplateFormat Format = "template" // DEPRECATED <-- TODO: remove in v1.0 EmbeddedVEXJSON Format = "embedded-cyclonedx-vex-json" EmbeddedVEXXML Format = "embedded-cyclonedx-vex-xml" )
type PresentationConfig ¶ added in v0.64.0
type ScanResultWriter ¶ added in v0.64.0
type ScanResultWriter interface {
Write(result models.PresenterConfig) error
}
func MakeScanResultWriter ¶ added in v0.64.0
func MakeScanResultWriter(outputs []string, defaultFile string, cfg PresentationConfig) (ScanResultWriter, error)
MakeScanResultWriter creates a ScanResultWriter for output or returns an error. this will either return a valid writer or an error but neither both and if there is no error, ScanResultWriter.Close() should be called
func MakeScanResultWriterForFormat ¶ added in v0.64.0
func MakeScanResultWriterForFormat(f string, path string, cfg PresentationConfig) (ScanResultWriter, error)
MakeScanResultWriterForFormat creates a ScanResultWriter for the given format or returns an error.
Click to show internal directories.
Click to hide internal directories.