from abc import ABCMeta, abstractproperty
from six import add_metaclass
@add_metaclass(ABCMeta)
class ManifestInterface(object):
""" Defines the interface for the various manifests types supported. """
@abstractproperty
def digest(self):
""" The digest of the manifest, including type prefix. """
pass
def media_type(self):
""" The media type of the schema. """
def manifest_dict(self):
""" Returns the manifest as a dictionary ready to be serialized to JSON. """
def bytes(self):
""" Returns the bytes of the manifest. """
def layers(self):
""" Returns the layers of this manifest, from base to leaf. """
def leaf_layer_v1_image_id(self):
""" Returns the Docker V1 image ID for the leaf (top) layer, if any, or None if none. """
def legacy_image_ids(self):
""" Returns the Docker V1 image IDs for the layers of this manifest or None if not applicable.
"""
def blob_digests(self):
""" Returns an iterator over all the blob digests referenced by this manifest,
from base to leaf. The blob digests are strings with prefixes.