Documentation ¶
Overview ¶
Package featurefmt exposes functions to dynamically register methods for determining the features present in an image layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListFeatures ¶
func ListFeatures(files tarutil.FilesMap) ([]database.FeatureVersion, error)
ListFeatures produces the list of FeatureVersions in an image layer using every registered Lister.
func LoadFileForTest ¶
LoadFileForTest can be used in order to obtain the []byte contents of a file that is meant to be used for test data.
func RegisterLister ¶
RegisterLister makes a Lister available by the provided name.
If called twice with the same name, the name is blank, or if the provided Lister is nil, this function panics.
func RequiredFilenames ¶
func RequiredFilenames() (files []string)
RequiredFilenames returns the total list of files required for all registered Listers.
Types ¶
type Lister ¶
type Lister interface { // ListFeatures produces a list of FeatureVersions present in an image layer. ListFeatures(tarutil.FilesMap) ([]database.FeatureVersion, error) // RequiredFilenames returns the list of files required to be in the FilesMap // provided to the ListFeatures method. // // Filenames must not begin with "/". RequiredFilenames() []string }
Lister represents an ability to list the features present in an image layer.
Directories ¶
Path | Synopsis |
---|---|
Package apk implements a featurefmt.Lister for APK packages.
|
Package apk implements a featurefmt.Lister for APK packages. |
Package dpkg implements a featurefmt.Lister for dpkg packages.
|
Package dpkg implements a featurefmt.Lister for dpkg packages. |
Package rpm implements a featurefmt.Lister for rpm packages.
|
Package rpm implements a featurefmt.Lister for rpm packages. |