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.Builderbuilder()Return a new builder for this registryvoiddeleteBlob(ContainerRef containerRef) Delete a blobvoiddeleteManifest(ContainerRef containerRef) Delete a manifestfetchBlob(ContainerRef containerRef) Fetch blob and return it as input streamvoidfetchBlob(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 StringGet 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.voidpullArtifact(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:OCIGet the tags for a ref- Specified by:
getTagsin classOCI<ContainerRef>- Parameters:
containerRef- The ref- Returns:
- The tags
-
getRepositories
Description copied from class:OCIGet the tags for a ref- Specified by:
getRepositoriesin classOCI<ContainerRef>- Returns:
- The repositories
-
getReferrers
Description copied from class:OCIGet the referrers of a container- Specified by:
getReferrersin 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:OCIPush a manifest- Specified by:
pushManifestin classOCI<ContainerRef>- Parameters:
containerRef- The refmanifest- The manifest- Returns:
- The location
-
pushIndex
Description copied from class:OCIPush an index- Specified by:
pushIndexin classOCI<ContainerRef>- Parameters:
containerRef- The refindex- The index- Returns:
- The index
-
deleteBlob
Delete a blob- Parameters:
containerRef- The container
-
pullArtifact
Description copied from class:OCIPull an artifact- Specified by:
pullArtifactin 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:OCIPush an artifact- Specified by:
pushArtifactin 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:OCIPush a blob from file- Specified by:
pushBlobin classOCI<ContainerRef>- Parameters:
containerRef- The containerblob- The blobannotations- The annotations- Returns:
- The layer
-
pushBlob
Description copied from class:OCIPush the blob for the given layer- Specified by:
pushBlobin 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:
getBlobin classOCI<ContainerRef>- Parameters:
containerRef- The container- Returns:
- The blob as bytes
-
fetchBlob
Description copied from class:OCIFetch blob and save it to file- Specified by:
fetchBlobin classOCI<ContainerRef>- Parameters:
containerRef- The refpath- The path to save the blob
-
fetchBlob
Description copied from class:OCIFetch blob and return it as input stream- Specified by:
fetchBlobin classOCI<ContainerRef>- Parameters:
containerRef- The ref- Returns:
- The input stream
-
fetchBlobDescriptor
Description copied from class:OCIFetch blob and return it's descriptor- Specified by:
fetchBlobDescriptorin classOCI<ContainerRef>- Parameters:
containerRef- The ref- Returns:
- The descriptor
-
getManifest
Description copied from class:OCIRetrieve a manifest- Specified by:
getManifestin classOCI<ContainerRef>- Parameters:
containerRef- The ref- Returns:
- The manifest
-
getIndex
Description copied from class:OCIRetrieve an index- Specified by:
getIndexin classOCI<ContainerRef>- Parameters:
containerRef- The ref- Returns:
- The index
-
getDescriptor
Description copied from class:OCIRetrieve a descriptor- Specified by:
getDescriptorin classOCI<ContainerRef>- Parameters:
containerRef- The ref- Returns:
- The descriptor
-
probeDescriptor
Description copied from class:OCIProbe a descriptor. Typically used to get digest, size and media type without the content- Specified by:
probeDescriptorin 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
-