Documentation ¶
Index ¶
- type ImageSource
- type ZipImageSource
- func (z *ZipImageSource) Close() error
- func (z *ZipImageSource) CopyToZip(writer *hashzip.Writer, tags []string) (m []diz.Manifest, err error)
- func (z *ZipImageSource) GetDigestToTags() (result map[string][]string, err error)
- func (z *ZipImageSource) GetNormalizedTagsToDigest() (result map[string]string, err error)
- func (z *ZipImageSource) GetRegistryManifest(repoTag string) (diz.RegistryManifest, error)
- func (z *ZipImageSource) GlobTags(tags []string) (result []string, err error)
- func (z *ZipImageSource) Manifests() []diz.Manifest
- func (z *ZipImageSource) Read(path string) (io.ReadCloser, error)
- func (z *ZipImageSource) ReadTar(tags []string) (io.ReadCloser, error)
- func (z *ZipImageSource) WriteFileByHash(writer io.Writer, layer string) error
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) 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
Click to show internal directories.
Click to hide internal directories.