image

package
v0.7.1-alpha Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEmptyLayerDiff

func IsEmptyLayerDiff(err error) bool

func IsNotExist

func IsNotExist(err error) bool

Types

type ErrEmptyLayerDiff

type ErrEmptyLayerDiff error

type ErrNotExist

type ErrNotExist error

type Image

type Image struct {
	ImageInfo
	Config ispecs.Image
}

func GetImage

func GetImage(store ImageStoreRW, image string) (img Image, err error)

func GetLocalImage

func GetLocalImage(store ImageStoreRO, image string) (img Image, err error)

func NewImage

func NewImage(info ImageInfo, config ispecs.Image) Image

type ImageInfo

type ImageInfo struct {
	Tag            *TagName
	ManifestDigest digest.Digest
	Manifest       ispecs.Manifest
	Created        time.Time
	LastUsed       time.Time
}

func NewImageInfo

func NewImageInfo(manifestDigest digest.Digest, manifest ispecs.Manifest, name *TagName, created, lastUsed time.Time) ImageInfo

func (*ImageInfo) ID

func (img *ImageInfo) ID() digest.Digest

func (*ImageInfo) Size

func (img *ImageInfo) Size() (size uint64)

type ImageStore

type ImageStore interface {
	ImageStoreRO
	OpenLockedImageStore() (ImageStoreRW, error)
	ImageGC(ttl, refTTL time.Duration, maxPerRepo int) error
	DelImage(id ...digest.Digest) error
}

type ImageStoreRO

type ImageStoreRO interface {
	Images() ([]*ImageInfo, error)
	Image(id digest.Digest) (Image, error)
	ImageByName(name string) (Image, error)
}

type ImageStoreRW

type ImageStoreRW interface {
	ImageStoreRO
	ImageUnpacker
	ImportImage(name string) (Image, error)
	SupportsTransport(transportName string) bool
	AddImageConfig(m ispecs.Image, parentImageId *digest.Digest) (Image, error)
	FS(imageId digest.Digest) (fs.FsNode, error)
	// Creates a new layer as diff to parent. Returns errEmptyLayerDiff if nothing has changed
	AddLayer(rootfs fs.FsNode, parentImageId *digest.Digest, author, createdByOp string) (Image, error)
	TagImage(imageId digest.Digest, tag string) (ImageInfo, error)
	UntagImage(tag string) error
	Close() error
}

type ImageUnpacker

type ImageUnpacker interface {
	UnpackImageLayers(id digest.Digest, rootfs string) error
}

type LayerSource

type LayerSource interface {
	DiffHash() (digest.Digest, error)
	Close() error
}

type TagName

type TagName struct {
	Repo string
	Ref  string
}

func (*TagName) String

func (t *TagName) String() string

type UnpackableImage

type UnpackableImage struct {
	*Image
	// contains filtered or unexported fields
}

func NewUnpackableImage

func NewUnpackableImage(img *Image, unpacker ImageUnpacker) *UnpackableImage

func (*UnpackableImage) Config

func (img *UnpackableImage) Config() *ispecs.Image

func (*UnpackableImage) Unpack

func (img *UnpackableImage) Unpack(dest string) error

Directories

Path Synopsis
See https://github.com/containers/image/blob/master/docs/policy.json.md
See https://github.com/containers/image/blob/master/docs/policy.json.md

Jump to

Keyboard shortcuts

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