imagesource

package
v0.0.0-...-4990f62 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageSource

type ImageSource interface {
	GlobTags(tags []string) ([]string, error)
	Close() error
	// CopyToZip copies the image contents to the zip archive, but does not write the manifest.
	CopyToZip(writer *hashzip.Writer, tags []string) ([]diz.Manifest, error)
	// ReadTar returns an io.Reader with a tar archive of the contents
	ReadTar(tags []string) (io.ReadCloser, error)
}

ImageSource defines an interface for working with Docker image sources

func NewDockerImageSource

func NewDockerImageSource(cli *client.Client, pull bool) (source ImageSource)

NewDockerImageSource returns a Docker image source

func NewNullImageSource

func NewNullImageSource() (source ImageSource)

NewNullImageSource returns an image source with no tags and no images

type ZipImageSource

type ZipImageSource struct {
	// contains filtered or unexported fields
}

func NewZipImageSource

func NewZipImageSource(zip string) (source *ZipImageSource, err error)

NewZipImageSource returns a zip image source

func (*ZipImageSource) Close

func (z *ZipImageSource) Close() error

func (*ZipImageSource) CopyToZip

func (z *ZipImageSource) CopyToZip(writer *hashzip.Writer, tags []string) (m []diz.Manifest, err error)

func (*ZipImageSource) GetDigestToTags

func (z *ZipImageSource) GetDigestToTags() (result map[string][]string, err error)

func (*ZipImageSource) GetNormalizedTagsToDigest

func (z *ZipImageSource) GetNormalizedTagsToDigest() (result map[string]string, err error)

func (*ZipImageSource) GetRegistryManifest

func (z *ZipImageSource) GetRegistryManifest(repoTag string) (diz.RegistryManifest, error)

func (*ZipImageSource) GlobTags

func (z *ZipImageSource) GlobTags(tags []string) (result []string, err error)

func (*ZipImageSource) Manifests

func (z *ZipImageSource) Manifests() []diz.Manifest

func (*ZipImageSource) Read

func (z *ZipImageSource) Read(path string) (io.ReadCloser, error)

func (*ZipImageSource) ReadTar

func (z *ZipImageSource) ReadTar(tags []string) (io.ReadCloser, error)

func (*ZipImageSource) WriteFileByHash

func (z *ZipImageSource) WriteFileByHash(writer io.Writer, layer string) error

Jump to

Keyboard shortcuts

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