Documentation ¶
Index ¶
- func ImageIndexFromFileImage(fi *sif.FileImage) (v1.ImageIndex, error)
- func Update(fi *sif.FileImage, ii v1.ImageIndex, opts ...UpdateOpt) error
- func Write(path string, ii v1.ImageIndex, opts ...WriteOpt) error
- type Layer
- func (l *Layer) Compressed() (io.ReadCloser, error)
- func (l *Layer) Descriptor() (*v1.Descriptor, error)
- func (l *Layer) DiffID() (v1.Hash, error)
- func (l *Layer) Digest() (v1.Hash, error)
- func (l *Layer) MediaType() (types.MediaType, error)
- func (l *Layer) Offset() (int64, error)
- func (l *Layer) Size() (int64, error)
- func (l *Layer) Uncompressed() (io.ReadCloser, error)
- type UpdateOpt
- type WriteOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImageIndexFromFileImage ¶
func ImageIndexFromFileImage(fi *sif.FileImage) (v1.ImageIndex, error)
ImageIndexFromFileImage returns a v1.ImageIndex corresponding to f.
func Update ¶ added in v0.11.0
Update modifies the SIF file associated with fi so that it holds the content of ImageIndex ii. Any blobs in the SIF that are not referenced in ii are removed from the SIF. Any blobs that are referenced in ii but not present in the SIF are added to the SIF. The RootIndex of the SIF is replaced with ii.
Update may create one or more temporary files during the update process. By default, the directory returned by os.TempDir is used. To override this, consider using OptUpdateTmpDir.
func Write ¶
func Write(path string, ii v1.ImageIndex, opts ...WriteOpt) error
Write constructs a SIF at path from an ImageIndex.
By default, the SIF is created with the exact number of descriptors required to represent ii. To include spare descriptor capacity, consider using OptWriteWithSpareDescriptorCapacity.
Types ¶
type Layer ¶ added in v0.7.0
type Layer struct {
// contains filtered or unexported fields
}
func (*Layer) Compressed ¶ added in v0.7.0
func (l *Layer) Compressed() (io.ReadCloser, error)
Compressed returns an io.ReadCloser for the compressed layer contents.
func (*Layer) Descriptor ¶ added in v0.7.0
func (l *Layer) Descriptor() (*v1.Descriptor, error)
Descriptor returns the original descriptor from an image manifest. See partial.Descriptor.
func (*Layer) Uncompressed ¶ added in v0.7.0
func (l *Layer) Uncompressed() (io.ReadCloser, error)
Uncompressed returns an io.ReadCloser for the uncompressed layer contents.
type UpdateOpt ¶ added in v0.11.0
type UpdateOpt func(*updateOpts) error
UpdateOpt are used to specify options to apply when updating a SIF.
func OptUpdateTempDir ¶ added in v0.11.0
OptUpdateTempDir sets the directory to use for temporary files. If not set, the directory returned by os.TempDir is used.
type WriteOpt ¶ added in v0.9.0
type WriteOpt func(*writeOpts) error
WriteOpt are used to specify write options.
func OptWriteWithSpareDescriptorCapacity ¶ added in v0.9.0
OptWriteWithSpareDescriptorCapacity specifies that the SIF should be created with n spare descriptors.