Documentation ¶
Index ¶
Constants ¶
View Source
const ( SourceFormatUnknown SourceFormat = iota SourceFormatGrypeJSON // grype JSON format SourceFormatTrivyJSON // trivy JSON format SourceFormatSnykJSON // snyk JSON format SourceFormatUnknownName = "unknown" SourceFormatGrypeJSONName = "grype" SourceFormatTrivyJSONName = "trivy" SourceFormatSnykJSONName = "snyk" )
View Source
const (
TestProjectID = "test"
)
Variables ¶
Functions ¶
func GetSourceFormatNames ¶
func GetSourceFormatNames() []string
GetSourceFormatNames returns the names of the supported source formats.
Types ¶
type ImportOptions ¶
type ImportOptions struct { // Project is the ID of the project to import the report into. Project string // Source is the URI of the image from which the report was generated. Source string // File path to the vulnerability report to import. File string // Format of the file to import. Format SourceFormat // Quiet suppresses output Quiet bool }
func (*ImportOptions) Validate ¶
func (i *ImportOptions) Validate() error
type NoteOccurrences ¶
type NoteOccurrences struct { // Note that the list of Occurrences points to. Note *g.Note // Occurrences that belong to the Note. Occurrences []*g.Occurrence }
NoteOccurrences is a helper struct to hold Note and Occurrences.
type SourceFormat ¶
type SourceFormat int64
SourceFormat represents the source format.
func GetSourceFormats ¶
func GetSourceFormats() []SourceFormat
GetSourceFormats returns the supported source formats.
func ParseSourceFormat ¶
func ParseSourceFormat(s string) (SourceFormat, error)
ParseSourceFormat parses the source format.
func (SourceFormat) String ¶
func (f SourceFormat) String() string
String returns the string representation of the source format.
Click to show internal directories.
Click to hide internal directories.