image

package
v0.0.0-...-84b6aa6 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RefNameAnnotation = "org.opencontainers.image.ref.name" // should it be defined in image-spec?
)

Variables

This section is empty.

Functions

func DeleteBlob

func DeleteBlob(img string, d digest.Digest) error

func Init

func Init(img string) error

func PutManifestDescriptorToIndex

func PutManifestDescriptorToIndex(img string, desc *spec.Descriptor) error

PutManifestDescriptorToIndex puts a manifest descriptor to the index. If ref name is set and conflicts with the existing descriptors, the old ones are removed.

func ReadBlob

func ReadBlob(img string, d digest.Digest) ([]byte, error)

func ReadImageLayout

func ReadImageLayout(img string) (*spec.ImageLayout, error)

func ReadIndex

func ReadIndex(img string) (*spec.Index, error)

func RemoveManifestDescriptorFromIndex

func RemoveManifestDescriptorFromIndex(img string, refName string) error

RemoveManifestDescriptorFromIndex removes the manifest descriptor from the index. Returns nil error when the entry not found.

func WriteBlob

func WriteBlob(img string, b []byte) (digest.Digest, error)

func WriteImageLayout

func WriteImageLayout(img string, layout *spec.ImageLayout) error

func WriteIndex

func WriteIndex(img string, idx *spec.Index) error

Types

type BlobReader

type BlobReader interface {
	io.ReadSeeker
	io.Closer
}

func GetBlobReader

func GetBlobReader(img string, d digest.Digest) (BlobReader, error)

type BlobWriter

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

func NewBlobWriter

func NewBlobWriter(img string, algo digest.Algorithm) (*BlobWriter, error)

func (*BlobWriter) Close

func (bw *BlobWriter) Close() error

func (*BlobWriter) Digest

func (bw *BlobWriter) Digest() *digest.Digest

Digest returns nil if unclosed

func (*BlobWriter) Write

func (bw *BlobWriter) Write(b []byte) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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