pkg

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Provide

func Provide(userInput string, scopeOpt source.Scope, registryOptions *image.RegistryOptions) ([]Package, Context, error)

Provide a set of packages and context metadata describing where they were sourced from.

Types

type Context

type Context struct {
	Source *source.Metadata
	Distro *distro.Distro
}

type DpkgMetadata

type DpkgMetadata struct {
	Source string
}

type ID

type ID string

ID represents a unique value for each package added to a package catalog.

type JavaMetadata

type JavaMetadata struct {
	PomArtifactID string
	PomGroupID    string
	ManifestName  string
}

type Package

type Package struct {
	Name      string            // the package name
	Version   string            // the version of the package
	Locations []source.Location // the locations that lead to the discovery of this package (note: this is not necessarily the locations that make up this package)
	Language  pkg.Language      // the language ecosystem this package belongs to (e.g. JavaScript, Python, etc)
	Licenses  []string
	Type      pkg.Type    // the package type (e.g. Npm, Yarn, Python, Rpm, Deb, etc)
	CPEs      []pkg.CPE   // all possible Common Platform Enumerators
	PURL      string      // the Package URL (see https://github.com/package-url/purl-spec)
	Metadata  interface{} // This is NOT the syft metadata! Only the select data needed for vulnerability matching
	// contains filtered or unexported fields
}

Package represents an application or library that has been bundled into a distributable format.

func ByID

func ByID(id ID, pkgs []Package) *Package

func FromCatalog

func FromCatalog(catalog *pkg.Catalog) []Package

func New

func New(p *pkg.Package) Package

func (Package) ID

func (p Package) ID() ID

ID returns the package ID, which is unique relative to a package catalog.

func (Package) String

func (p Package) String() string

Stringer to represent a package.

type RpmdbMetadata

type RpmdbMetadata struct {
	SourceRpm string
}

Jump to

Keyboard shortcuts

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