Documentation ¶
Index ¶
Constants ¶
View Source
const ( OSDebian = "debian" OSFedora = "fedora" OSAlpine = "alpine" OSDistroless = "distroless" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerScanner ¶
type ContainerScanner struct{}
TODO: Move functions to its own implementation
func (*ContainerScanner) ReadDebianPackages ¶
func (ct *ContainerScanner) ReadDebianPackages(layers []string) (layer int, pk *[]PackageDBEntry, err error)
ReadDebianPackages scans through a set of container layers looking for the last update to the debian package datgabase. If found, extracts it and sends it to parseDpkgDB to extract the package information from the file.
func (*ContainerScanner) ReadOSPackages ¶
func (ct *ContainerScanner) 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.
type ErrFileNotFoundInTar ¶
type ErrFileNotFoundInTar struct{}
func (ErrFileNotFoundInTar) Error ¶
func (e ErrFileNotFoundInTar) Error() string
type LayerScanner ¶
type LayerScanner struct{}
TODO: Move functions to its own implementation
func (*LayerScanner) OSReleaseData ¶
func (loss *LayerScanner) OSReleaseData(layerPath string) (osrelease string, err error)
CanHandle looks at an image tarball and checks if it looks like a debian filesystem
type PackageDBEntry ¶
Click to show internal directories.
Click to hide internal directories.