summaryrefslogtreecommitdiff
path: root/src/chunkmeta.rs
AgeCommit message (Collapse)AuthorFilesLines
2022-09-09chore: tidy up things to satisfy clippyLars Wirzenius1-1/+1
Sponsored-by: author
2022-04-16feat! change how chunk labels are serializedLars Wirzenius1-3/+3
Serialized labels now start with a type prefix: a character that says what type of label it is. This isn't strictly required: we _can_ just decide to always use a single type of checksum for all chunks in one backup, for one client, or in the whole repository. However, if it's ever possible to have more than one type, it helps debugging if every checksum, when serialized, is explicit about its type. Change things to use the new serialize method instead of the Display trait for Label. We're primarily serializing labels so they can be stored in a database, and used in URLs, only secondarily showing them to users. Sponsored-by: author
2022-04-16refactor: rename Checksum to LabelLars Wirzenius1-10/+10
Label is a clearer and more accurate name for the type now that it is not just a checksum. Also, serialize a Label in tests, rather than using string literals. This is more correct, and we'll be changing serialization later. Sponsored-by: author
2022-03-22feat! drop generation related fields from chunk metadataLars Wirzenius1-49/+6
Sponsored-by: author
2022-03-13feat! rename metadata field "sha256" to "label"Lars Wirzenius1-16/+21
The field still contains a cleartext SHa256 of the cleartext chunk data, but this makes it clearer that it may contain other data. This is a breaking change: the server API won't work with an old client, and the new client won't work with an old server. To avoid the breakage would require more effort than is warranted at this time, given the very small number of users of Obnam. Sorry. Sponsored-by: author
2021-12-31docs: add documentation comments to crateLars Wirzenius1-0/+2
Also, make it an error for a public symbol to not be documented. Sponsored-by: author
2021-09-18refactor: define a Checksum type and use it where appropriateLars Wirzenius1-7/+12
This will make it harder to compare, say, a SHA-256 and a SHA3, later, when we add more checksum types. Sponsored-by: author
2021-05-29refactor: make metadata part of a chunkLars Wirzenius1-1/+20
This makes is harder to accidentally use the wrong metadata for a chunk.
2021-03-27refactor: use matches! for clarityLars Wirzenius1-4/+1
2021-02-10fix: don't use the matched! macroLars Wirzenius1-1/+4
Rust compiler gives an error due to it being too new.
2020-10-16chore: fix style issues pointed out by clippyLars Wirzenius1-5/+2
2020-09-18feat: add a rudimentary chunk server main programLars Wirzenius1-1/+1
Also, add an initial subplot to document and verify acceptance criteria.
2020-09-17feat: store chunks persistentlyLars Wirzenius1-1/+1
2020-09-17feat: add initial ChunkMeta structLars Wirzenius1-0/+147