Documentation ¶
Index ¶
Constants ¶
View Source
const ( OsReleasePath = "etc/os-release" AltOSReleasePath = "usr/lib/os-release" )
Variables ¶
This section is empty.
Functions ¶
func ReadOSPackages ¶ added in v0.6.0
func ReadOSPackages(layers []string) ( layerNum int, packages *[]PackageDBEntry, err error, )
ReadOSPackages reads a bunch of layers and extracts the os package information from them, it returns the OS package and the layer where they are defined. If the OS is not supported, we return a nil pointer.
Types ¶
type ErrFileNotFoundInTar ¶
type ErrFileNotFoundInTar struct{}
func (ErrFileNotFoundInTar) Error ¶
func (e ErrFileNotFoundInTar) Error() string
type PackageDBEntry ¶
type PackageDBEntry struct { Package string Version string Architecture string Type string // purl package type (ref: https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst) Namespace string // purl namespace MaintainerName string MaintainerEmail string HomePage string License string // License expression Checksums map[string]string }
func (*PackageDBEntry) DownloadLocation ¶ added in v0.6.0
func (e *PackageDBEntry) DownloadLocation() string
DownloadLocation synthesizes a download location for the packages based on known location for the different distros
func (*PackageDBEntry) PackageURL ¶ added in v0.3.0
func (e *PackageDBEntry) PackageURL() string
PackageURL returns a purl representing the db entry. If the entry does not have enough data to generate the purl, it will return an empty string
Click to show internal directories.
Click to hide internal directories.