oras-project / rust-oci-client

A Rust crate to interact with OCI registries
Apache License 2.0
86 stars 45 forks source link

Create new LayerDescriptor for pulling blobs #124

Closed SuperTux88 closed 3 months ago

SuperTux88 commented 3 months ago

The old OciDescriptor has too many fields, which maybe aren't available when trying to pull a blob with only the digest. In the past you only needed the digest as string, but the optional urls field was added (in #108). But all other fields of the OciDescriptor aren't required when pulling a blob, but are required by the struct. The LayerDescriptor struct now has only the fields which are used for pulling.

This is a breaking change, as it changes the signature of the pull methods. But with this it is now possible to pull a blob with only the digest as a &str again.