pub struct MappedRegistry<R> { /* private fields */ }Expand description
Wraps a BucketRegistry to add path-based routing.
When get_bucket is called, the bucket name is parsed via
PathMapping::parse_bucket_name and the resulting ListRewrite
and display_name are applied to the resolved bucket. This allows the
gateway to present hierarchical names in S3 XML responses while storing
data in flat internal buckets.
Implementations§
Source§impl<R> MappedRegistry<R>
impl<R> MappedRegistry<R>
Sourcepub fn new(inner: R, mapping: PathMapping) -> Self
pub fn new(inner: R, mapping: PathMapping) -> Self
Create a new MappedRegistry wrapping the given registry with a path mapping.
Trait Implementations§
Source§impl<R: BucketRegistry> BucketRegistry for MappedRegistry<R>
impl<R: BucketRegistry> BucketRegistry for MappedRegistry<R>
Source§async fn get_bucket(
&self,
name: &str,
identity: &ResolvedIdentity,
operation: &S3Operation,
) -> Result<ResolvedBucket, ProxyError>
async fn get_bucket( &self, name: &str, identity: &ResolvedIdentity, operation: &S3Operation, ) -> Result<ResolvedBucket, ProxyError>
Resolve a bucket by name, checking authorization for the given identity and operation. Read more
Source§async fn list_buckets(
&self,
identity: &ResolvedIdentity,
) -> Result<Vec<BucketEntry>, ProxyError>
async fn list_buckets( &self, identity: &ResolvedIdentity, ) -> Result<Vec<BucketEntry>, ProxyError>
List all buckets visible to the given identity.
Source§fn bucket_owner(&self) -> BucketOwner
fn bucket_owner(&self) -> BucketOwner
The owner identity returned in
ListAllMyBucketsResult responses. Read moreSource§impl<R: Clone> Clone for MappedRegistry<R>
impl<R: Clone> Clone for MappedRegistry<R>
Source§fn clone(&self) -> MappedRegistry<R>
fn clone(&self) -> MappedRegistry<R>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<R> Freeze for MappedRegistry<R>where
R: Freeze,
impl<R> RefUnwindSafe for MappedRegistry<R>where
R: RefUnwindSafe,
impl<R> Send for MappedRegistry<R>where
R: Send,
impl<R> Sync for MappedRegistry<R>where
R: Sync,
impl<R> Unpin for MappedRegistry<R>where
R: Unpin,
impl<R> UnsafeUnpin for MappedRegistry<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for MappedRegistry<R>where
R: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more