Image defines the interface for interacting with an OCI v1 image.
| 20 | |
| 21 | // Image defines the interface for interacting with an OCI v1 image. |
| 22 | type 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 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…