clair: github.com/coreos/clair/ext/imagefmt Index | Files | Directories

package imagefmt

import "github.com/coreos/clair/ext/imagefmt"

Package imagefmt exposes functions to dynamically register methods to detect different types of container image formats.

Index

Package Files

driver.go

Variables

var (
    // ErrCouldNotFindLayer is returned when we could not download or open the layer file.
    ErrCouldNotFindLayer = commonerr.NewBadRequestError("could not find layer from given path")
)

func Extract Uses

func Extract(format string, blobReader io.ReadCloser, filePaths []string) (tarutil.FilesMap, error)

Extract a set of files as FilesMap from a layer blob.

func Extractors Uses

func Extractors() map[string]Extractor

Extractors returns the list of the registered extractors.

func IsSupported Uses

func IsSupported(format string) bool

IsSupported checks if a format is supported

func RegisterExtractor Uses

func RegisterExtractor(name string, d Extractor)

RegisterExtractor makes an extractor available by the provided name.

If called twice with the same name, the name is blank, or if the provided Extractor is nil, this function panics.

func UnregisterExtractor Uses

func UnregisterExtractor(name string)

UnregisterExtractor removes a Extractor with a particular name from the list.

type Extractor Uses

type Extractor interface {
    // ExtractFiles produces a tarutil.FilesMap from a image layer.
    ExtractFiles(layer io.ReadCloser, filenames []string) (tarutil.FilesMap, error)
}

Extractor represents an ability to extract files from a particular container image format.

Directories

PathSynopsis
aciPackage aci implements an imagefmt.Extractor for appc formatted container image layers.
dockerPackage docker implements an imagefmt.Extractor for docker formatted container image layers.

Package imagefmt imports 6 packages (graph) and is imported by 15 packages. Updated 2019-02-27. Refresh now. Tools for package owners.