Closed Xynnn007 closed 1 year ago
How do you intend for this to be consumed? Does the user use the config type if they want it and then have to serialize it to
Vec<u8>
? Or is there another way to make it easier? Just want to make sure I understand!
I've added a new API oci_v1_from_config_file
to construct a Config
using a ConfigFile
. Typical scenarios:
pull()
to get ImageData
, and then he can parse the image_data.config.data
into a structure to do some other things.To me the first scenario is needed, because current impl uses an empty config, which may be detected as illegal image for some registries. Thus, I want to provide some detailed support for OCI Configuration and let users use it arbitrarily.
For some configurations inside a registry may seem different from what the spec defines, I did not integrate deserialization of config into fn pull
and leave it to users to use by their own and to their needs.
Related to https://github.com/krustlet/oci-distribution/issues/50, added structure definitions.