diff --git a/crates/esthri/src/lib.rs b/crates/esthri/src/lib.rs index 5f410cfe..3f5045d2 100644 --- a/crates/esthri/src/lib.rs +++ b/crates/esthri/src/lib.rs @@ -378,7 +378,13 @@ async fn list_objects_request( for object in contents { match (object.key, object.e_tag) { (Some(key), Some(e_tag)) => { - listing.contents.push(S3Object { key, e_tag }); + listing.contents.push(S3Object { + key, + e_tag, + storage_class: object.storage_class, + size: object.size, + last_modified: object.last_modified, + }); } (key, etag) => { if key.is_none() { diff --git a/crates/esthri/src/types.rs b/crates/esthri/src/types.rs index c24919ef..9529c38c 100644 --- a/crates/esthri/src/types.rs +++ b/crates/esthri/src/types.rs @@ -17,6 +17,8 @@ use std::{ result::Result as StdResult, }; +use aws_sdk_s3::primitives::DateTime; +use aws_sdk_s3::types::ObjectStorageClass; use regex::Regex; use serde::{Deserialize, Deserializer, Serialize, Serializer}; @@ -149,9 +151,13 @@ impl S3Listing { } #[derive(Debug, Clone)] +#[non_exhaustive] pub struct S3Object { pub key: String, pub e_tag: String, + pub storage_class: Option, + pub size: Option, + pub last_modified: Option, } /// For syncing from remote to local, or local to remote, "metadata" is attached to the listing in