Skip to content

Commit

Permalink
Merge pull request #36 from dandi/gh-9
Browse files Browse the repository at this point in the history
Support downloading old versions of objects
  • Loading branch information
jwodder authored Nov 25, 2024
2 parents 0cb553a + f4df37a commit e39ae10
Show file tree
Hide file tree
Showing 7 changed files with 482 additions and 54 deletions.
89 changes: 88 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ flate2 = "1.0.35"
fs-err = "3.0.0"
futures-util = "0.3.31"
hex = "0.4.3"
lockable = "0.1.1"
md-5 = "0.10.6"
percent-encoding = "2.3.1"
regex = "1.11.1"
Expand Down
1 change: 1 addition & 0 deletions src/consts.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub(crate) static METADATA_FILENAME: &str = ".s3invsync.versions.json";
4 changes: 0 additions & 4 deletions src/inventory/item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ impl InventoryItem {
S3Location::new(self.bucket.clone(), self.key.clone())
.with_version_id(self.version_id.clone())
}

pub(crate) fn is_deleted(&self) -> bool {
self.details == ItemDetails::Deleted
}
}

#[derive(Clone, Debug, Eq, PartialEq)]
Expand Down
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
mod asyncutil;
mod consts;
mod inventory;
mod manifest;
mod s3;
mod syncer;
mod timestamps;
mod util;
use crate::s3::{get_bucket_region, S3Client, S3Location};
use crate::syncer::Syncer;
use crate::timestamps::DateMaybeHM;
Expand Down
Loading

0 comments on commit e39ae10

Please sign in to comment.