diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-03-12 07:52:05 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-03-13 08:55:48 +0200 |
commit | 29e68de7973f2b294c50b7d33ef216a8f095b9f9 (patch) | |
tree | 4103f4c460d0db422b999b4f19097cd489b2a6ca /src/indexedstore.rs | |
parent | 5e79c4f9b3e5789d1d40c2144ba6c3b6a868dae7 (diff) | |
download | obnam2-29e68de7973f2b294c50b7d33ef216a8f095b9f9.tar.gz |
feat! rename metadata field "sha256" to "label"
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
Diffstat (limited to 'src/indexedstore.rs')
-rw-r--r-- | src/indexedstore.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/indexedstore.rs b/src/indexedstore.rs index 49953ee..46f9e72 100644 --- a/src/indexedstore.rs +++ b/src/indexedstore.rs @@ -63,9 +63,9 @@ impl IndexedStore { Ok(self.index.get_meta(id)?) } - /// Find chunks with a given checksum. - pub fn find_by_sha256(&self, sha256: &str) -> Result<Vec<ChunkId>, IndexedError> { - Ok(self.index.find_by_sha256(sha256)?) + /// Find chunks with a client-assigned label. + pub fn find_by_label(&self, label: &str) -> Result<Vec<ChunkId>, IndexedError> { + Ok(self.index.find_by_label(label)?) } /// Find all generations. |