Package land.oras
Class OCILayout
Index from an OCI layout
-
Nested Class Summary
Nested Classes -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copy
(Registry registry, ContainerRef containerRef) Copy the direct container ref from registry into oci-layoutvoid
copy
(Registry registry, ContainerRef containerRef, boolean recursive) Copy the container ref from registry into oci-layoutFetch blob and return it as input streamvoid
Fetch blob and save it to fileFetch blob and return it's descriptorstatic OCILayout
Create the OCI layout file from a JSON stringstatic OCILayout
fromLayoutIndex
(Path layoutPath) Return the OCI layout from the index.json filebyte[]
Get the blob for the given digest.getDescriptor
(LayoutRef ref) Retrieve a descriptorReturn the image layout versionRetrieve an indexgetManifest
(LayoutRef ref) Retrieve a manifestvoid
pullArtifact
(LayoutRef ref, Path path, boolean overwrite) Pull an artifactpushArtifact
(LayoutRef ref, ArtifactType artifactType, Annotations annotations, @Nullable Config config, LocalPath... paths) Push an artifactPush the blob for the given layerPush a blob from filepushManifest
(LayoutRef layoutRef, Manifest manifest) Push a manifesttoJson()
Return the JSON representation of the referrersMethods inherited from class land.oras.OCI
attachArtifact, attachArtifact, pushArtifact, pushArtifact, pushArtifact, pushBlob, pushBlob, pushConfig, pushLayers
-
Method Details
-
pushArtifact
public Manifest pushArtifact(LayoutRef ref, ArtifactType artifactType, Annotations annotations, @Nullable Config config, LocalPath... paths) Description copied from class:OCI
Push an artifact- Specified by:
pushArtifact
in classOCI<LayoutRef>
- Parameters:
ref
- The containerartifactType
- The artifact type. Can be nullannotations
- The annotationsconfig
- The configpaths
- The paths- Returns:
- The manifest
-
pullArtifact
Description copied from class:OCI
Pull an artifact- Specified by:
pullArtifact
in classOCI<LayoutRef>
- Parameters:
ref
- The reference of the artifactpath
- The path to save the artifactoverwrite
- Overwrite the artifact if it exists
-
pushManifest
Description copied from class:OCI
Push a manifest- Specified by:
pushManifest
in classOCI<LayoutRef>
- Parameters:
layoutRef
- The refmanifest
- The manifest- Returns:
- The location
-
getIndex
Description copied from class:OCI
Retrieve an index -
getManifest
Description copied from class:OCI
Retrieve a manifest- Specified by:
getManifest
in classOCI<LayoutRef>
- Parameters:
ref
- The ref- Returns:
- The manifest
-
getBlob
Description copied from class:OCI
Get the blob for the given digest. Not be suitable for large blobs -
fetchBlob
Description copied from class:OCI
Fetch blob and save it to file -
fetchBlob
Description copied from class:OCI
Fetch blob and return it as input stream -
fetchBlobDescriptor
Description copied from class:OCI
Fetch blob and return it's descriptor- Specified by:
fetchBlobDescriptor
in classOCI<LayoutRef>
- Parameters:
ref
- The ref- Returns:
- The descriptor
-
pushBlob
Description copied from class:OCI
Push a blob from file -
pushBlob
Description copied from class:OCI
Push the blob for the given layer -
toJson
Return the JSON representation of the referrers- Returns:
- The JSON string
-
fromJson
Create the OCI layout file from a JSON string- Parameters:
json
- The JSON string- Returns:
- The OCI layout
-
getImageLayoutVersion
Return the image layout version- Returns:
- The image layout version
-
copy
Copy the direct container ref from registry into oci-layout- Parameters:
registry
- The registrycontainerRef
- The container
-
copy
Copy the container ref from registry into oci-layout- Parameters:
registry
- The registrycontainerRef
- The containerrecursive
- True if references should be copied
-
getDescriptor
Description copied from class:OCI
Retrieve a descriptor- Specified by:
getDescriptor
in classOCI<LayoutRef>
- Parameters:
ref
- The ref- Returns:
- The descriptor
-
fromLayoutIndex
Return the OCI layout from the index.json file- Parameters:
layoutPath
- The path to the layout containing the index.json file- Returns:
- The OCI layout
-