view

package
v0.0.0-...-0df2be5 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTestResult

func GenerateTestResult(path string, untested *untestedComponents, issues *issuesComponent, sum *summary) (testResult, error)

GenerateSummary constructs a summary and generates it's string representation intended for human readable output.

Function returns an error if generation of string representation fails.

func Render

func Render(dst io.Writer, p *Presentation) (int, error)

Render will combine and _mutate_ data to construct view with issues sorted using this precedence: severity, vulnerability reference, first package in introducedBy. The string result will be written to dst as a bytes.

Notice: This function may alter incoming data, such as the order of elements in the issues parameter.

Types

type Component

type Component struct {
	Reference string
	Info      string
}

type IntroducedBy

type IntroducedBy struct {
	Name    string
	Version string
	PURL    string
}

type OpenIssue

type OpenIssue struct {
	Severity     severities.Level
	Description  string
	IntroducedBy []IntroducedBy
	SnykRef      string
}

type Presentation

type Presentation struct {
	Org, Path string
	Untested  []Component
	Issues    []OpenIssue
	Summary   Summary
}

type Summary

type Summary struct {
	Critical int
	High     int
	Medium   int
	Low      int

	TotalIssues  int
	UntestedPkgs int
}

Jump to

Keyboard shortcuts

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