pub struct PresignedUrlGenerator {
pub credentials: CloudCredentials,
pub region: String,
}Expand description
Generates presigned URLs using AWS SigV4 / GCS v4 signing.
The implementation is entirely pure Rust — no external cryptographic crates.
Fields§
§credentials: CloudCredentialsThe credentials used for signing.
region: StringAWS / GCS region.
Implementations§
Source§impl PresignedUrlGenerator
impl PresignedUrlGenerator
Sourcepub fn new(credentials: CloudCredentials, region: impl Into<String>) -> Self
pub fn new(credentials: CloudCredentials, region: impl Into<String>) -> Self
Create a new generator.
Sourcepub fn canonical_query_string(&self, params: &[(String, String)]) -> String
pub fn canonical_query_string(&self, params: &[(String, String)]) -> String
Build a sorted canonical query string from key-value pairs.
Sourcepub fn generate_s3(
&self,
url: &ObjectUrl,
config: &PresignedUrlConfig,
timestamp_unix: u64,
) -> Result<String, CloudError>
pub fn generate_s3( &self, url: &ObjectUrl, config: &PresignedUrlConfig, timestamp_unix: u64, ) -> Result<String, CloudError>
Generate an AWS SigV4 presigned URL.
Sourcepub fn generate_gcs(
&self,
url: &ObjectUrl,
config: &PresignedUrlConfig,
timestamp_unix: u64,
) -> Result<String, CloudError>
pub fn generate_gcs( &self, url: &ObjectUrl, config: &PresignedUrlConfig, timestamp_unix: u64, ) -> Result<String, CloudError>
Generate a GCS v4 presigned URL (same signing algorithm as S3 SigV4).
Auto Trait Implementations§
impl Freeze for PresignedUrlGenerator
impl RefUnwindSafe for PresignedUrlGenerator
impl Send for PresignedUrlGenerator
impl Sync for PresignedUrlGenerator
impl Unpin for PresignedUrlGenerator
impl UnsafeUnpin for PresignedUrlGenerator
impl UnwindSafe for PresignedUrlGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more