pub struct AuthResolver { /* private fields */ }Expand description
Authentication resolver that converts AuthConfig to oci_client RegistryAuth
Implementations§
Source§impl AuthResolver
impl AuthResolver
Sourcepub fn new(config: AuthConfig) -> Self
pub fn new(config: AuthConfig) -> Self
Create a new authentication resolver
Sourcepub fn resolve(&self, image: &str) -> RegistryAuth
pub fn resolve(&self, image: &str) -> RegistryAuth
Resolve authentication for an image reference
Extracts the registry from the image reference and returns the appropriate
oci_client::secrets::RegistryAuth.
Sourcepub fn source_for_registry(&self, registry: &str) -> &AuthSource
pub fn source_for_registry(&self, registry: &str) -> &AuthSource
Return the AuthSource that would be used for the given registry hostname.
Looks up the per-registry map first, falling back to the default source.
Sourcepub fn resolve_source(
&self,
source: &AuthSource,
registry: &str,
) -> RegistryAuth
pub fn resolve_source( &self, source: &AuthSource, registry: &str, ) -> RegistryAuth
Resolve a specific AuthSource to RegistryAuth.
This is the synchronous resolution path. AuthSource::SecretStore
cannot be resolved synchronously and returns Anonymous with a
warning log.
Auto Trait Implementations§
impl Freeze for AuthResolver
impl RefUnwindSafe for AuthResolver
impl Send for AuthResolver
impl Sync for AuthResolver
impl Unpin for AuthResolver
impl UnsafeUnpin for AuthResolver
impl UnwindSafe for AuthResolver
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