Class OciManifestTemplate
- java.lang.Object
-
- com.google.cloud.tools.jib.image.json.OciManifestTemplate
-
- All Implemented Interfaces:
BuildableManifestTemplate
,ManifestTemplate
,JsonTemplate
public class OciManifestTemplate extends java.lang.Object implements BuildableManifestTemplate
JSON Template for OCI Manifest Schema.Example manifest JSON:
{ "schemaVersion": 2, "mediaType": "application/vnd.oci.image.manifest.v1+json", "config": { "mediaType": "application/vnd.oci.image.config.v1+json", "size": 631, "digest": "sha256:26b84ca5b9050d32e68f66ad0f3e2bbcd247198a6e6e09a7effddf126eb8d873" }, "layers": [ { "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", "size": 1991435, "digest": "sha256:b56ae66c29370df48e7377c8f9baa744a3958058a766793f821dadcb144a4647" }, { "mediaType": "application/vnd.oci.image.layer.v1.tar+gzip", "size": 32, "digest": "sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" } ] }
- See Also:
- OCI Image Manifest Specification
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.cloud.tools.jib.image.json.BuildableManifestTemplate
BuildableManifestTemplate.ContentDescriptorTemplate
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MANIFEST_MEDIA_TYPE
The OCI manifest media type.
-
Constructor Summary
Constructors Constructor Description OciManifestTemplate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLayer(long size, DescriptorDigest digest)
Adds a layer to the manifest.BuildableManifestTemplate.ContentDescriptorTemplate
getContainerConfiguration()
Returns the content descriptor of the container configuration.java.util.List<BuildableManifestTemplate.ContentDescriptorTemplate>
getLayers()
Returns an unmodifiable view of the layers.java.lang.String
getManifestMediaType()
Returns the media type for this manifest, specific to the image format.int
getSchemaVersion()
void
setContainerConfiguration(long size, DescriptorDigest digest)
Sets the content descriptor of the container configuration.
-
-
-
Field Detail
-
MANIFEST_MEDIA_TYPE
public static final java.lang.String MANIFEST_MEDIA_TYPE
The OCI manifest media type.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSchemaVersion
public int getSchemaVersion()
- Specified by:
getSchemaVersion
in interfaceManifestTemplate
-
getManifestMediaType
public java.lang.String getManifestMediaType()
Description copied from interface:BuildableManifestTemplate
Returns the media type for this manifest, specific to the image format.- Specified by:
getManifestMediaType
in interfaceBuildableManifestTemplate
- Specified by:
getManifestMediaType
in interfaceManifestTemplate
- Returns:
- the media type for this manifest, specific to the image format
-
getContainerConfiguration
@Nullable public BuildableManifestTemplate.ContentDescriptorTemplate getContainerConfiguration()
Description copied from interface:BuildableManifestTemplate
Returns the content descriptor of the container configuration.- Specified by:
getContainerConfiguration
in interfaceBuildableManifestTemplate
- Returns:
- the content descriptor of the container configuration
-
getLayers
public java.util.List<BuildableManifestTemplate.ContentDescriptorTemplate> getLayers()
Description copied from interface:BuildableManifestTemplate
Returns an unmodifiable view of the layers.- Specified by:
getLayers
in interfaceBuildableManifestTemplate
- Returns:
- an unmodifiable view of the layers
-
setContainerConfiguration
public void setContainerConfiguration(long size, DescriptorDigest digest)
Description copied from interface:BuildableManifestTemplate
Sets the content descriptor of the container configuration.- Specified by:
setContainerConfiguration
in interfaceBuildableManifestTemplate
- Parameters:
size
- the size of the container configuration.digest
- the container configuration content descriptor digest.
-
addLayer
public void addLayer(long size, DescriptorDigest digest)
Description copied from interface:BuildableManifestTemplate
Adds a layer to the manifest.- Specified by:
addLayer
in interfaceBuildableManifestTemplate
- Parameters:
size
- the size of the layer.digest
- the layer descriptor digest.
-
-