summaryrefslogtreecommitdiff
path: root/src/chunk.rs
AgeCommit message (Collapse)AuthorFilesLines
2022-09-09chore: tidy up things to satisfy clippyLars Wirzenius1-1/+1
Sponsored-by: author
2022-04-16refactor: rename Checksum to LabelLars Wirzenius1-3/+3
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-04-16refactor: add a Literal variant to ChecksumLars Wirzenius1-1/+1
We've had fake checksums that are just arbitrary literal strings, and this change makes this more explicit. It's a preliminary change for later support for additional checksum algorithms. Sponsored-by: author
2022-03-22feat! drop generation related fields from chunk metadataLars Wirzenius1-3/+3
Sponsored-by: author
2022-03-22feat! store list of generations in a "client trust root" chunkLars Wirzenius1-0/+95
Backups made with this version can't be restored with old clients, and vice version. Sponsored-by: author
2022-03-13feat! rename metadata field "sha256" to "label"Lars Wirzenius1-2/+2
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-5/+24
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-2/+2
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-07-21Replace GenerationChunkResult with plain ResultAlexander Batischev1-5/+2
2021-05-29refactor: make metadata part of a chunkLars Wirzenius1-1/+1
This makes is harder to accidentally use the wrong metadata for a chunk.
2021-05-29refactor: make metadata be part of datachunkLars Wirzenius1-5/+17
This makes it harder to lose the metadata for a chunk, or to use unrelated metadata and chunk. Also, soon I will refactor things for encrypting chunks, which will need metadata embedded in the encrypted chunk. Sponsored-by: author
2021-04-29feat: improve error messagesLars Wirzenius1-4/+7
All unclear error messages should now be clearer. For example, all the ones related to a file mention the file name and the attempted operation that failed.
2021-02-04refactor: have per-module error enumsLars Wirzenius1-2/+15
This means that a function that parses step bindings can't return an error that the document is missing a title. Such an error return would be nonsensical, and we use the Rust type system to prevent it, at a small cost of being a bit verbose. Additional benefit is that the library portion of Obnam doesn't return anyhow::Result values anymore.
2021-01-04refactor: use fetch_chunk to fetch generationLars Wirzenius1-0/+6
Also, add GenerationChunk::from_data_chunk function.
2020-12-23refactor: use a struct instead of a tupleLars Wirzenius1-1/+1
It seems this is more idiomatic in Rust.
2020-10-16feat: obnam-restore restores generation to stdoutLars Wirzenius1-2/+32
2020-10-14refactor: rename Chunk to DataChunkLars Wirzenius1-3/+3
2020-10-14refactor: move chunk metadata out of chunk structLars Wirzenius1-9/+2
2020-09-18feat: add a rudimentary chunk server main programLars Wirzenius1-0/+2
Also, add an initial subplot to document and verify acceptance criteria.
2020-09-17feat: add initial Chunk structLars Wirzenius1-0/+29