pub struct AuthClient<T> { /* private fields */ }Implementations§
Source§impl AuthClient<Channel>
impl AuthClient<Channel>
Source§impl<T> AuthClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> AuthClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> AuthClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>,
<T as Service<Request<Body>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn auth_enable(
&mut self,
request: impl IntoRequest<AuthEnableRequest>,
) -> Result<Response<AuthEnableResponse>, Status>
pub async fn auth_enable( &mut self, request: impl IntoRequest<AuthEnableRequest>, ) -> Result<Response<AuthEnableResponse>, Status>
AuthEnable enables authentication.
Sourcepub async fn auth_disable(
&mut self,
request: impl IntoRequest<AuthDisableRequest>,
) -> Result<Response<AuthDisableResponse>, Status>
pub async fn auth_disable( &mut self, request: impl IntoRequest<AuthDisableRequest>, ) -> Result<Response<AuthDisableResponse>, Status>
AuthDisable disables authentication.
Sourcepub async fn authenticate(
&mut self,
request: impl IntoRequest<AuthenticateRequest>,
) -> Result<Response<AuthenticateResponse>, Status>
pub async fn authenticate( &mut self, request: impl IntoRequest<AuthenticateRequest>, ) -> Result<Response<AuthenticateResponse>, Status>
Authenticate processes an authenticate request.
Sourcepub async fn user_add(
&mut self,
request: impl IntoRequest<AuthUserAddRequest>,
) -> Result<Response<AuthUserAddResponse>, Status>
pub async fn user_add( &mut self, request: impl IntoRequest<AuthUserAddRequest>, ) -> Result<Response<AuthUserAddResponse>, Status>
UserAdd adds a new user.
Sourcepub async fn user_get(
&mut self,
request: impl IntoRequest<AuthUserGetRequest>,
) -> Result<Response<AuthUserGetResponse>, Status>
pub async fn user_get( &mut self, request: impl IntoRequest<AuthUserGetRequest>, ) -> Result<Response<AuthUserGetResponse>, Status>
UserGet gets detailed user information.
Sourcepub async fn user_list(
&mut self,
request: impl IntoRequest<AuthUserListRequest>,
) -> Result<Response<AuthUserListResponse>, Status>
pub async fn user_list( &mut self, request: impl IntoRequest<AuthUserListRequest>, ) -> Result<Response<AuthUserListResponse>, Status>
UserList gets a list of all users.
Sourcepub async fn user_delete(
&mut self,
request: impl IntoRequest<AuthUserDeleteRequest>,
) -> Result<Response<AuthUserDeleteResponse>, Status>
pub async fn user_delete( &mut self, request: impl IntoRequest<AuthUserDeleteRequest>, ) -> Result<Response<AuthUserDeleteResponse>, Status>
UserDelete deletes a specified user.
Sourcepub async fn user_change_password(
&mut self,
request: impl IntoRequest<AuthUserChangePasswordRequest>,
) -> Result<Response<AuthUserChangePasswordResponse>, Status>
pub async fn user_change_password( &mut self, request: impl IntoRequest<AuthUserChangePasswordRequest>, ) -> Result<Response<AuthUserChangePasswordResponse>, Status>
UserChangePassword changes the password of a specified user.
Sourcepub async fn user_grant_role(
&mut self,
request: impl IntoRequest<AuthUserGrantRoleRequest>,
) -> Result<Response<AuthUserGrantRoleResponse>, Status>
pub async fn user_grant_role( &mut self, request: impl IntoRequest<AuthUserGrantRoleRequest>, ) -> Result<Response<AuthUserGrantRoleResponse>, Status>
UserGrant grants a role to a specified user.
Sourcepub async fn user_revoke_role(
&mut self,
request: impl IntoRequest<AuthUserRevokeRoleRequest>,
) -> Result<Response<AuthUserRevokeRoleResponse>, Status>
pub async fn user_revoke_role( &mut self, request: impl IntoRequest<AuthUserRevokeRoleRequest>, ) -> Result<Response<AuthUserRevokeRoleResponse>, Status>
UserRevokeRole revokes a role of specified user.
Sourcepub async fn role_add(
&mut self,
request: impl IntoRequest<AuthRoleAddRequest>,
) -> Result<Response<AuthRoleAddResponse>, Status>
pub async fn role_add( &mut self, request: impl IntoRequest<AuthRoleAddRequest>, ) -> Result<Response<AuthRoleAddResponse>, Status>
RoleAdd adds a new role.
Sourcepub async fn role_get(
&mut self,
request: impl IntoRequest<AuthRoleGetRequest>,
) -> Result<Response<AuthRoleGetResponse>, Status>
pub async fn role_get( &mut self, request: impl IntoRequest<AuthRoleGetRequest>, ) -> Result<Response<AuthRoleGetResponse>, Status>
RoleGet gets detailed role information.
Sourcepub async fn role_list(
&mut self,
request: impl IntoRequest<AuthRoleListRequest>,
) -> Result<Response<AuthRoleListResponse>, Status>
pub async fn role_list( &mut self, request: impl IntoRequest<AuthRoleListRequest>, ) -> Result<Response<AuthRoleListResponse>, Status>
RoleList gets lists of all roles.
Sourcepub async fn role_delete(
&mut self,
request: impl IntoRequest<AuthRoleDeleteRequest>,
) -> Result<Response<AuthRoleDeleteResponse>, Status>
pub async fn role_delete( &mut self, request: impl IntoRequest<AuthRoleDeleteRequest>, ) -> Result<Response<AuthRoleDeleteResponse>, Status>
RoleDelete deletes a specified role.
Sourcepub async fn role_grant_permission(
&mut self,
request: impl IntoRequest<AuthRoleGrantPermissionRequest>,
) -> Result<Response<AuthRoleGrantPermissionResponse>, Status>
pub async fn role_grant_permission( &mut self, request: impl IntoRequest<AuthRoleGrantPermissionRequest>, ) -> Result<Response<AuthRoleGrantPermissionResponse>, Status>
RoleGrantPermission grants a permission of a specified key or range to a specified role.
Sourcepub async fn role_revoke_permission(
&mut self,
request: impl IntoRequest<AuthRoleRevokePermissionRequest>,
) -> Result<Response<AuthRoleRevokePermissionResponse>, Status>
pub async fn role_revoke_permission( &mut self, request: impl IntoRequest<AuthRoleRevokePermissionRequest>, ) -> Result<Response<AuthRoleRevokePermissionResponse>, Status>
RoleRevokePermission revokes a key or range permission of a specified role.
Trait Implementations§
Source§impl<T: Clone> Clone for AuthClient<T>
impl<T: Clone> Clone for AuthClient<T>
Source§fn clone(&self) -> AuthClient<T>
fn clone(&self) -> AuthClient<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for AuthClient<T>
impl<T> RefUnwindSafe for AuthClient<T>where
T: RefUnwindSafe,
impl<T> Send for AuthClient<T>where
T: Send,
impl<T> Sync for AuthClient<T>where
T: Sync,
impl<T> Unpin for AuthClient<T>where
T: Unpin,
impl<T> UnwindSafe for AuthClient<T>where
T: 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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request