Skip to content

Commit

Permalink
Metada API: document timestamp.snapshot_meta
Browse files Browse the repository at this point in the history
Document snapshot_meta as the API that should be used when interacting
with timestamp meta information about snapshot.
Also, document that "meta" is an internal detail mimicking the spec
file format.

Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
  • Loading branch information
MVrachev committed Jul 14, 2021
1 parent 0390644 commit 1b5481b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tuf/api/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,11 +846,15 @@ def verify_length_and_hashes(self, data: Union[bytes, BinaryIO]) -> None:
class Timestamp(Signed):
"""A container for the signed part of timestamp metadata.
Timestamp contains information about the snapshot Metadata file.
Timestamp contains information about the snapshot file: use the
"snapshot_meta" attribute to read or modify it.
Attributes:
meta: A dictionary of filenames to MetaFiles. The only valid key value
is the snapshot filename, as defined by the specification.
snapshot_meta: MetaFile instance used as API for interacting with
snapshot meta information.
meta: Implementation detail mimicking the spec file format. A dictionary
of filenames to MetaFiles. The only valid key value is the snapshot
filename, as defined by the specification.
"""

_signed_type = "timestamp"
Expand Down

0 comments on commit 1b5481b

Please sign in to comment.