presenter

package
v0.0.0-...-63db9e9 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

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

This section is empty.

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

Config is the presenter domain's configuration data structure.

func ValidatedConfig

func ValidatedConfig(output, outputTemplateFile string, showSuppressed bool) (Config, error)

ValidatedConfig returns a new, validated presenter.Config. If a valid Config cannot be created using the given input, an error is returned.

type Presenter

type Presenter interface {
	Present(io.Writer) error
}

Presenter is the main interface other Presenters need to implement

func GetPresenter

func GetPresenter(c Config, pb models.PresenterConfig) Presenter

GetPresenter retrieves a Presenter that matches a CLI option TODO dependency cycle with presenter package to sub formats

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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