options

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArchImageInfo added in v0.5.0

type ArchImageInfo struct {
	Digest     v1.Hash
	Arch       types.Architecture
	SBOMDigest string
}

type ImageInfo

type ImageInfo struct {
	Reference       string
	Tag             string
	Name            string
	Repository      string
	LayerDigest     string
	ImageDigest     string
	VCSUrl          string
	IndexMediaType  ggcrtypes.MediaType
	ImageMediaType  ggcrtypes.MediaType
	IndexDigest     v1.Hash
	Images          []ArchImageInfo
	Arch            types.Architecture
	SourceDateEpoch time.Time
}

type OSInfo

type OSInfo struct {
	Name    string
	ID      string
	Version string
}

type Options

type Options struct {
	OS OSInfo

	ImageInfo ImageInfo

	// Working directory,inherited from build context
	FS fs.FS

	// The reference of the generated image. Used for naming and purls
	ImageReference string

	// OutputDir is the directory where the sboms will be written
	OutputDir string

	// FileName is the base name for the sboms, the proper extension will get appended
	FileName string

	// Formats dictates which SBOM formats we will output
	Formats []string

	// Packages is alist of packages which will be listed in the SBOM
	Packages []*apk.InstalledPackage
}

func (*Options) ArchImagePurlQualifiers added in v0.5.0

func (o *Options) ArchImagePurlQualifiers(aii *ArchImageInfo) PurlQualifiers

ArchImagePurlQualifiers returns the details

func (*Options) ImagePurlName added in v0.5.0

func (o *Options) ImagePurlName() string

ImagePurlName returns a name to represent the image in a purl

func (*Options) ImagePurlQualifiers added in v0.5.0

func (o *Options) ImagePurlQualifiers() (qualifiers PurlQualifiers)

ImagePurlQualifiers returns the qualifiers for an image, the extra data that goes into the purl quey string

func (*Options) IndexPurlName added in v0.5.0

func (o *Options) IndexPurlName() string

IndexPurlName returns a name to refer to the image index in purls

func (*Options) IndexPurlQualifiers added in v0.5.0

func (o *Options) IndexPurlQualifiers() PurlQualifiers

IndexPurlQualifiers returns the qualifiers for the multiarch index

func (*Options) LayerPurlQualifiers added in v0.5.0

func (o *Options) LayerPurlQualifiers() (qualifiers PurlQualifiers)

LayerPurlQualifiers reurns the qualifiers for the purl, they are based on the image with the corresponding mediatype

type PurlQualifiers added in v0.6.0

type PurlQualifiers map[string]string

func (PurlQualifiers) String added in v0.6.0

func (pq PurlQualifiers) String() string

This function is here while a fix in the purl library gets merged ref: https://github.com/package-url/packageurl-go/pull/22

Jump to

Keyboard shortcuts

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