options

package
v0.0.0-...-aa12904 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = Options{
	RepoOrg:  "wolfi-dev",
	RepoName: "advisories",
	PredicateTypesList: []string{
		"spdx", "cyclonedx",
	},
}

Functions

This section is empty.

Types

type Options

type Options struct {
	// Reference of the container image to VEX. If the reference points to a
	// multiarch index fronting more than one image, Platform must be specified.
	ImageReference string

	// Image purl is a package URL rendering of the image reference
	ImagePurl string

	// Platform is a platform label. If the image reference is a multiarch index
	// this will be used to select one of images fronted by the index.
	Platform string

	// PredicateTypesList List of predicates to consider when fetching attached documents
	// from the registry. By default, vexi will look for SPDX/CycloneDX documents only.
	PredicateTypesList []string

	// Directory to look for advisory data. If left blank, the repository will
	// be cloned to a temporary directory.
	AdvisoriesDir string

	// IsTempDIr takes a bool value that, when true, will cause the advisories dir to be cloned
	IsTempDir bool

	// RepoOrg is the github organization of the advisory repository
	RepoOrg string

	// RepoName is the advisory repository name
	RepoName string

	// Outfile is the path to a file to sotre the resulting OpenVEX document.
	// is left blank, it will be output to STDOUT.
	OutFile string
	// contains filtered or unexported fields
}

func (*Options) AddFlags

func (opts *Options) AddFlags(cmd *cobra.Command)

AddGenerateOptions

func (*Options) PredicateTypeFormats

func (opts *Options) PredicateTypeFormats() []payload.Format

PredicateTypeFormats returns simple text labels that represent the SBOM types that are more suitable to use in flags.

func (*Options) Validate

func (opts *Options) Validate() error

Validate checks an options set to ensure it is sound. If the advisories directory is emtpy, it will create a temporary one to clone the wolfi repository into it.

Jump to

Keyboard shortcuts

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