Struct etcd_client::AuthClient[][src]

#[repr(transparent)]
pub struct AuthClient { /* fields omitted */ }

Client for Auth operations.

Implementations

impl AuthClient[src]

pub async fn auth_enable(&mut self) -> Result<AuthEnableResponse, Error>[src]

Enables authentication.

pub async fn auth_disable(&mut self) -> Result<AuthDisableResponse, Error>[src]

Disables authentication.

pub async fn authenticate(
    &mut self,
    name: String,
    password: String
) -> Result<AuthenticateResponse, Error>
[src]

Processes an authenticate request.

pub async fn role_add(
    &mut self,
    name: impl Into<String>
) -> Result<RoleAddResponse, Error>
[src]

Adds role

pub async fn role_delete(
    &mut self,
    name: impl Into<String>
) -> Result<RoleDeleteResponse, Error>
[src]

Deletes role

pub async fn role_get(
    &mut self,
    name: impl Into<String>
) -> Result<RoleGetResponse, Error>
[src]

Gets role

pub async fn role_list(&mut self) -> Result<RoleListResponse, Error>[src]

Lists role

pub async fn role_grant_permission(
    &mut self,
    name: impl Into<String>,
    perm: Permission
) -> Result<RoleGrantPermissionResponse, Error>
[src]

Grants role permission

pub async fn role_revoke_permission(
    &mut self,
    name: impl Into<String>,
    key: impl Into<Vec<u8>>,
    options: Option<RoleRevokePermissionOptions>
) -> Result<RoleRevokePermissionResponse, Error>
[src]

Revokes role permission

pub async fn user_add(
    &mut self,
    name: impl Into<String>,
    password: impl Into<String>,
    options: Option<UserAddOptions>
) -> Result<UserAddResponse, Error>
[src]

Adds user

pub async fn user_get(
    &mut self,
    name: impl Into<String>
) -> Result<UserGetResponse, Error>
[src]

Gets user

pub async fn user_list(&mut self) -> Result<UserListResponse, Error>[src]

Lists user

pub async fn user_delete(
    &mut self,
    name: impl Into<String>
) -> Result<UserDeleteResponse, Error>
[src]

Deletes user

pub async fn user_change_password(
    &mut self,
    name: impl Into<String>,
    password: impl Into<String>
) -> Result<UserChangePasswordResponse, Error>
[src]

Change user’s password

pub async fn user_grant_role(
    &mut self,
    name: impl Into<String>,
    role: impl Into<String>
) -> Result<UserGrantRoleResponse, Error>
[src]

Grant role for an user

pub async fn user_revoke_role(
    &mut self,
    name: impl Into<String>,
    role: impl Into<String>
) -> Result<UserRevokeRoleResponse, Error>
[src]

Revoke role for an user

Trait Implementations

impl Clone for AuthClient[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]