Package land.oras
Class Registry
A registry is the main entry point for interacting with a container registry
-
Nested Class Summary
Nested Classes -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Registry.Builder
builder()
Return a new builder for this registryvoid
deleteBlob
(ContainerRef containerRef) Delete a blobvoid
deleteManifest
(ContainerRef containerRef) Delete a manifestfetchBlob
(ContainerRef containerRef) Fetch blob and return it as input streamvoid
fetchBlob
(ContainerRef containerRef, Path path) Fetch blob and save it to filefetchBlobDescriptor
(ContainerRef containerRef) Fetch blob and return it's descriptorbyte[]
getBlob
(ContainerRef containerRef) Get the blob for the given digest.getBlobStream
(ContainerRef containerRef) Get blob as stream to avoid loading into memorygetDescriptor
(ContainerRef containerRef) Retrieve a descriptorgetIndex
(ContainerRef containerRef) Retrieve an indexgetManifest
(ContainerRef containerRef) Retrieve a manifestgetReferrers
(ContainerRef containerRef, @Nullable ArtifactType artifactType) Get the referrers of a container@Nullable String
Get the registry URLGet the tags for a refGet the HTTP scheme depending on the insecure flaggetTags
(ContainerRef containerRef) Get the tags for a refProbe a descriptor.void
pullArtifact
(ContainerRef containerRef, Path path, boolean overwrite) Pull an artifactpushArtifact
(ContainerRef containerRef, ArtifactType artifactType, Annotations annotations, @Nullable Config config, LocalPath... paths) Push an artifactpushBlob
(ContainerRef containerRef, byte[] data) Push the blob for the given layerPush a blob from filepushIndex
(ContainerRef containerRef, Index index) Push an indexpushManifest
(ContainerRef containerRef, Manifest manifest) Push a manifestMethods inherited from class land.oras.OCI
attachArtifact, attachArtifact, collectLayers, isIndexMediaType, isManifestMediaType, pullConfig, pushArtifact, pushArtifact, pushArtifact, pushBlob, pushBlob, pushConfig, pushLayers
-
Method Details
-
builder
Return a new builder for this registry- Returns:
- The builder
-
getScheme
Get the HTTP scheme depending on the insecure flag- Returns:
- The scheme
-
getRegistry
Get the registry URL- Returns:
- The registry URL
-
getTags
Description copied from class:OCI
Get the tags for a ref- Specified by:
getTags
in classOCI<ContainerRef>
- Parameters:
containerRef
- The ref- Returns:
- The tags
-
getRepositories
Description copied from class:OCI
Get the tags for a ref- Specified by:
getRepositories
in classOCI<ContainerRef>
- Returns:
- The repositories
-
getReferrers
Description copied from class:OCI
Get the referrers of a container- Specified by:
getReferrers
in classOCI<ContainerRef>
- Parameters:
containerRef
- The refartifactType
- The optional artifact type- Returns:
- The referrers
-
deleteManifest
Delete a manifest- Parameters:
containerRef
- The artifact
-
pushManifest
Description copied from class:OCI
Push a manifest- Specified by:
pushManifest
in classOCI<ContainerRef>
- Parameters:
containerRef
- The refmanifest
- The manifest- Returns:
- The location
-
pushIndex
Description copied from class:OCI
Push an index- Specified by:
pushIndex
in classOCI<ContainerRef>
- Parameters:
containerRef
- The refindex
- The index- Returns:
- The index
-
deleteBlob
Delete a blob- Parameters:
containerRef
- The container
-
pullArtifact
Description copied from class:OCI
Pull an artifact- Specified by:
pullArtifact
in classOCI<ContainerRef>
- Parameters:
containerRef
- The reference of the artifactpath
- The path to save the artifactoverwrite
- Overwrite the artifact if it exists
-
pushArtifact
public Manifest pushArtifact(ContainerRef containerRef, ArtifactType artifactType, Annotations annotations, @Nullable Config config, LocalPath... paths) Description copied from class:OCI
Push an artifact- Specified by:
pushArtifact
in classOCI<ContainerRef>
- Parameters:
containerRef
- The containerartifactType
- The artifact type. Can be nullannotations
- The annotationsconfig
- The configpaths
- The paths- Returns:
- The manifest
-
pushBlob
Description copied from class:OCI
Push a blob from file- Specified by:
pushBlob
in classOCI<ContainerRef>
- Parameters:
containerRef
- The containerblob
- The blobannotations
- The annotations- Returns:
- The layer
-
pushBlob
Description copied from class:OCI
Push the blob for the given layer- Specified by:
pushBlob
in classOCI<ContainerRef>
- Parameters:
containerRef
- The container refdata
- The data- Returns:
- The layer
-
getBlob
Get the blob for the given digest. Not be suitable for large blobs- Specified by:
getBlob
in classOCI<ContainerRef>
- Parameters:
containerRef
- The container- Returns:
- The blob as bytes
-
fetchBlob
Description copied from class:OCI
Fetch blob and save it to file- Specified by:
fetchBlob
in classOCI<ContainerRef>
- Parameters:
containerRef
- The refpath
- The path to save the blob
-
fetchBlob
Description copied from class:OCI
Fetch blob and return it as input stream- Specified by:
fetchBlob
in classOCI<ContainerRef>
- Parameters:
containerRef
- The ref- Returns:
- The input stream
-
fetchBlobDescriptor
Description copied from class:OCI
Fetch blob and return it's descriptor- Specified by:
fetchBlobDescriptor
in classOCI<ContainerRef>
- Parameters:
containerRef
- The ref- Returns:
- The descriptor
-
getManifest
Description copied from class:OCI
Retrieve a manifest- Specified by:
getManifest
in classOCI<ContainerRef>
- Parameters:
containerRef
- The ref- Returns:
- The manifest
-
getIndex
Description copied from class:OCI
Retrieve an index- Specified by:
getIndex
in classOCI<ContainerRef>
- Parameters:
containerRef
- The ref- Returns:
- The index
-
getDescriptor
Description copied from class:OCI
Retrieve a descriptor- Specified by:
getDescriptor
in classOCI<ContainerRef>
- Parameters:
containerRef
- The ref- Returns:
- The descriptor
-
probeDescriptor
Description copied from class:OCI
Probe a descriptor. Typically used to get digest, size and media type without the content- Specified by:
probeDescriptor
in classOCI<ContainerRef>
- Parameters:
ref
- The ref- Returns:
- The descriptor
-
getBlobStream
Get blob as stream to avoid loading into memory- Parameters:
containerRef
- The container ref- Returns:
- The input stream
-