1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
use std::time::Duration;
use url::Url;
pub use self::create_bucket::CreateBucket;
pub use self::delete_bucket::DeleteBucket;
pub use self::delete_object::DeleteObject;
#[cfg(feature = "full")]
pub use self::delete_objects::{DeleteObjects, ObjectIdentifier};
pub use self::get_object::GetObject;
pub use self::head_object::HeadObject;
#[cfg(feature = "full")]
#[doc(inline)]
pub use self::list_objects_v2::{ListObjectsV2, ListObjectsV2Response};
pub use self::multipart_upload::abort::AbortMultipartUpload;
#[cfg(feature = "full")]
pub use self::multipart_upload::complete::CompleteMultipartUpload;
#[cfg(feature = "full")]
pub use self::multipart_upload::create::CreateMultipartUpload;
#[cfg(feature = "full")]
pub use self::multipart_upload::list_parts::{ListParts, ListPartsResponse};
pub use self::multipart_upload::upload::UploadPart;
pub use self::put_object::PutObject;
use crate::{Map, Method};
mod create_bucket;
mod delete_bucket;
mod delete_object;
#[cfg(feature = "full")]
mod delete_objects;
mod get_object;
mod head_object;
#[cfg(feature = "full")]
pub mod list_objects_v2;
mod multipart_upload;
mod put_object;
use time::OffsetDateTime;
pub trait S3Action<'a> {
const METHOD: Method;
fn sign(&self, expires_in: Duration) -> Url {
let now = OffsetDateTime::now_utc();
self.sign_with_time(expires_in, &now)
}
fn query_mut(&mut self) -> &mut Map<'a>;
fn headers_mut(&mut self) -> &mut Map<'a>;
fn sign_with_time(&self, expires_in: Duration, time: &OffsetDateTime) -> Url;
}