Expand description
Lock file: a record of what a TEI resolved to and what the artifacts were.
Experimental until 0.9. The JSON layout is versioned by schemaVersion
(currently LOCK_SCHEMA_VERSION); the Rust types may change in a minor
release.
The format is documented in docs/lock-file.md and described by
docs/schemas/lock-v1.schema.json. This module does no I/O and reads no
clock: callers supply every value, including fetchedAt.
What a lock proves. It records the integrity outcome of checksums over
decoded artifact bytes at fetchedAt. That is not publisher authenticity,
and a lock file is not signed: whoever can edit it can change it.
No secrets. LockFile::validate rejects a server URL that carries
userinfo, a query or a fragment. Nothing else in the format holds
credentials.
Structs§
- Changed
Artifact - An entry present in both locks whose content differs.
- Field
Change - A change to one scalar of the lock header or of an entry.
- Lock
Diff - Differences between two locks.
fetchedAtis ignored. - Lock
File - A lock file,
schemaVersion1. - Locked
Artifact - One format of one artifact revision.
- Locked
Checksum - A declared checksum as recorded in a lock.
Enums§
- Locked
Integrity - How an artifact’s declared checksums fared when the lock was written.
Constants§
- LOCK_
SCHEMA_ VERSION - The only lock layout this crate reads and writes.
- MAX_
ALGORITHM_ LEN - Longest accepted checksum algorithm name.
- MAX_
MEDIA_ TYPE_ LEN - Longest accepted
mediaType. - MAX_
TEI_ LEN - Longest accepted
tei. - MAX_
TYPE_ LEN - Longest accepted artifact
type. - MAX_
VERSION_ LEN - Longest accepted
apiVersion.
Functions§
- diff
- Compare two locks. Neither is modified; entries are matched by artifact UUID and media type, so a new revision shows as a change, not as a removal plus an addition.