pub struct K8sAuthService { /* private fields */ }Expand description
K8s Auth provider.
Implementations§
Source§impl K8sAuthService
impl K8sAuthService
pub fn new<P: PluginManagerApi>( config: &Config, plugin_manager: &P, ) -> Result<Self, K8sAuthProviderError>
Trait Implementations§
Source§impl K8sAuthApi for K8sAuthService
impl K8sAuthApi for K8sAuthService
Source§fn authenticate_by_k8s_sa_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
req: &'life2 K8sAuthRequest,
) -> Pin<Box<dyn Future<Output = Result<(AuthenticatedInfo, TokenRestriction), K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn authenticate_by_k8s_sa_token<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
req: &'life2 K8sAuthRequest,
) -> Pin<Box<dyn Future<Output = Result<(AuthenticatedInfo, TokenRestriction), K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Authenticate (exchange) the K8s Service account token.
Source§fn create_auth_instance<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
instance: K8sAuthInstanceCreate,
) -> Pin<Box<dyn Future<Output = Result<K8sAuthInstance, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_auth_instance<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
instance: K8sAuthInstanceCreate,
) -> Pin<Box<dyn Future<Output = Result<K8sAuthInstance, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Register new K8s auth instance.
Source§fn create_auth_role<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
role: K8sAuthRoleCreate,
) -> Pin<Box<dyn Future<Output = Result<K8sAuthRole, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_auth_role<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
role: K8sAuthRoleCreate,
) -> Pin<Box<dyn Future<Output = Result<K8sAuthRole, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Register new K8s auth role.
Source§fn delete_auth_instance<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<(), K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_auth_instance<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<(), K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete K8s auth provider.
Source§fn delete_auth_role<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<(), K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_auth_role<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<(), K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete K8s auth role.
Source§fn get_auth_instance<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<K8sAuthInstance>, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_auth_instance<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<K8sAuthInstance>, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Register new K8s auth instance.
Source§fn get_auth_role<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<K8sAuthRole>, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_auth_role<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Option<K8sAuthRole>, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Register new K8s auth role.
Source§fn list_auth_instances<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
params: &'life2 K8sAuthInstanceListParameters,
) -> Pin<Box<dyn Future<Output = Result<Vec<K8sAuthInstance>, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_auth_instances<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
params: &'life2 K8sAuthInstanceListParameters,
) -> Pin<Box<dyn Future<Output = Result<Vec<K8sAuthInstance>, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List K8s auth instances.
Source§fn list_auth_roles<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
params: &'life2 K8sAuthRoleListParameters,
) -> Pin<Box<dyn Future<Output = Result<Vec<K8sAuthRole>, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_auth_roles<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
params: &'life2 K8sAuthRoleListParameters,
) -> Pin<Box<dyn Future<Output = Result<Vec<K8sAuthRole>, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List K8s auth roles.
Source§fn update_auth_instance<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
data: K8sAuthInstanceUpdate,
) -> Pin<Box<dyn Future<Output = Result<K8sAuthInstance, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_auth_instance<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
data: K8sAuthInstanceUpdate,
) -> Pin<Box<dyn Future<Output = Result<K8sAuthInstance, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update K8s auth instance.
Source§fn update_auth_role<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
data: K8sAuthRoleUpdate,
) -> Pin<Box<dyn Future<Output = Result<K8sAuthRole, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_auth_role<'a, 'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 ServiceState,
id: &'a str,
data: K8sAuthRoleUpdate,
) -> Pin<Box<dyn Future<Output = Result<K8sAuthRole, K8sAuthProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update K8s auth role.
Auto Trait Implementations§
impl !Freeze for K8sAuthService
impl !RefUnwindSafe for K8sAuthService
impl Send for K8sAuthService
impl Sync for K8sAuthService
impl Unpin for K8sAuthService
impl UnsafeUnpin for K8sAuthService
impl !UnwindSafe for K8sAuthService
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> 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