MCPcopy
hub / github.com/google/go-containerregistry / Image

Interface Image

pkg/v1/image.go:22–59  ·  view source on GitHub ↗

Image defines the interface for interacting with an OCI v1 image.

Source from the content-addressed store, hash-verified

20
21// Image defines the interface for interacting with an OCI v1 image.
22type Image interface {
23 // Layers returns the ordered collection of filesystem layers that comprise this image.
24 // The order of the list is oldest/base layer first, and most-recent/top layer last.
25 Layers() ([]Layer, error)
26
27 // MediaType of this image's manifest.
28 MediaType() (types.MediaType, error)
29
30 // Size returns the size of the manifest.
31 Size() (int64, error)
32
33 // ConfigName returns the hash of the image's config file, also known as
34 // the Image ID.
35 ConfigName() (Hash, error)
36
37 // ConfigFile returns this image's config file.
38 ConfigFile() (*ConfigFile, error)
39
40 // RawConfigFile returns the serialized bytes of ConfigFile().
41 RawConfigFile() ([]byte, error)
42
43 // Digest returns the sha256 of this image's manifest.
44 Digest() (Hash, error)
45
46 // Manifest returns this image's Manifest object.
47 Manifest() (*Manifest, error)
48
49 // RawManifest returns the serialized bytes of Manifest()
50 RawManifest() ([]byte, error)
51
52 // LayerByDigest returns a Layer for interacting with a particular layer of
53 // the image, looking it up by "digest" (the compressed hash).
54 LayerByDigest(Hash) (Layer, error)
55
56 // LayerByDiffID is an analog to LayerByDigest, looking up by "diff id"
57 // (the uncompressed hash).
58 LayerByDiffID(Hash) (Layer, error)
59}

Callers 57

TestDiskPushFunction · 0.65
v1LayerIDsFunction · 0.65
MultiWriteFunction · 0.65
LayersMethod · 0.65
TestFilesystemCacheFunction · 0.65
TestReadOnlyFunction · 0.65
TestLayersLazyFunction · 0.65
TestTarLayerFunction · 0.65
setRefsMethod · 0.65
ExportFunction · 0.65
AppendFunction · 0.65

Implementers 4

schema1pkg/v1/remote/schema1.go
FakeImagepkg/v1/fake/image.go
imagepkg/v1/daemon/image.go
imagepkg/v1/mutate/image.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…