Remove MetadataWrapper
class
#1304
Labels
experimental-client
Items related to the development of a new client (see milestone/8 and theexperimental-client branch)
Milestone
I find it a bit paradox that
MetadataWrapper
is another container on top ofMetadata
, adding another level of nesting, when most of the methods/properties are actually shortcuts to attributes contained somewhere inMetadata
. If we want a client-variant ofMetadata
, I'd maybe use inheritance instead of composition. 🤷But maybe we don't even need it. Let's quickly go through the individual methods/properties of here:
On
MetadataWrapper
:from_json_file
-> available asMetadata.from_file
with json as default (Move metadata class model de/serialization to sub-package #1279)from_json_object
-> could be a format-agnostic method onMetadata
just likefrom_file
. Implement from_object/from_string method in Metadata class #1336persist
-> available asMetadata.to_file
with json as default (Move metadata class model de/serialization to sub-package #1279)expires
-> could be a method onSigned
, I'd call it 'is_expired' Add 'expired' method to Signed class #1305verify
-> This is definitely needed for the repository tool as well. So it should be somewhere where both client and repository tool can access it. Maybe even onMetadata
in addition to the vanilla one-signatureverify
we currently have. See A simple, per-file metadata CRUD API #1060 (comment) for thoughts about that distinction. Implement verification by a threshold of keys #1306All the other methods here are either pure shortcuts or filters of attributes contained in Metadata objects (or contained objects).
Originally posted by @lukpueh in #1291 (comment)
The text was updated successfully, but these errors were encountered: