Skip to main content

SysHandler

Struct SysHandler 

Source
pub struct SysHandler<'a> { /* private fields */ }

Implementations§

Source§

impl SysHandler<'_>

Source

pub async fn list_audit_devices( &self, ) -> Result<HashMap<String, AuditDevice>, VaultError>

Source

pub async fn enable_audit( &self, path: &str, params: &AuditParams, ) -> Result<(), VaultError>

Source

pub async fn disable_audit(&self, path: &str) -> Result<(), VaultError>

Source§

impl SysHandler<'_>

Source

pub async fn health(&self) -> Result<HealthResponse, VaultError>

Source

pub async fn leader(&self) -> Result<LeaderResponse, VaultError>

Source§

impl SysHandler<'_>

Source

pub async fn read_lease(&self, lease_id: &str) -> Result<LeaseInfo, VaultError>

Source

pub async fn renew_lease( &self, lease_id: &str, increment: Option<&str>, ) -> Result<LeaseRenewal, VaultError>

Source

pub async fn revoke_lease(&self, lease_id: &str) -> Result<(), VaultError>

Source

pub async fn revoke_prefix(&self, prefix: &str) -> Result<(), VaultError>

Source§

impl SysHandler<'_>

Source

pub async fn list_mounts( &self, ) -> Result<HashMap<String, MountInfo>, VaultError>

Source

pub async fn mount( &self, path: &str, params: &MountParams, ) -> Result<(), VaultError>

Source

pub async fn unmount(&self, path: &str) -> Result<(), VaultError>

Source

pub async fn tune_mount( &self, path: &str, params: &MountTuneParams, ) -> Result<(), VaultError>

Source

pub async fn read_mount_tune( &self, path: &str, ) -> Result<MountConfig, VaultError>

Source

pub async fn list_auth_mounts( &self, ) -> Result<HashMap<String, AuthMountInfo>, VaultError>

Source

pub async fn enable_auth( &self, path: &str, params: &AuthMountParams, ) -> Result<(), VaultError>

Source

pub async fn disable_auth(&self, path: &str) -> Result<(), VaultError>

Source

pub async fn read_auth_tune( &self, path: &str, ) -> Result<MountConfig, VaultError>

Source§

impl SysHandler<'_>

Source

pub async fn list_namespaces(&self) -> Result<Vec<String>, VaultError>

Source

pub async fn create_namespace( &self, path: &str, ) -> Result<NamespaceInfo, VaultError>

Source

pub async fn delete_namespace(&self, path: &str) -> Result<(), VaultError>

Source§

impl SysHandler<'_>

Source

pub async fn list_plugins( &self, plugin_type: &str, ) -> Result<Vec<String>, VaultError>

Source

pub async fn read_plugin( &self, plugin_type: &str, name: &str, ) -> Result<PluginInfo, VaultError>

Source

pub async fn register_plugin( &self, params: &RegisterPluginRequest, ) -> Result<(), VaultError>

Source

pub async fn deregister_plugin( &self, plugin_type: &str, name: &str, ) -> Result<(), VaultError>

Source

pub async fn reload_plugin(&self, plugin: &str) -> Result<(), VaultError>

Source§

impl SysHandler<'_>

Source

pub async fn list_policies(&self) -> Result<Vec<String>, VaultError>

Source

pub async fn read_policy(&self, name: &str) -> Result<PolicyInfo, VaultError>

Source

pub async fn write_policy( &self, name: &str, rules: &str, ) -> Result<(), VaultError>

Source

pub async fn delete_policy(&self, name: &str) -> Result<(), VaultError>

Source§

impl SysHandler<'_>

Source

pub async fn list_rate_limit_quotas(&self) -> Result<Vec<String>, VaultError>

Source

pub async fn read_rate_limit_quota( &self, name: &str, ) -> Result<RateLimitQuota, VaultError>

Source

pub async fn write_rate_limit_quota( &self, name: &str, params: &RateLimitQuotaRequest, ) -> Result<(), VaultError>

Source

pub async fn delete_rate_limit_quota( &self, name: &str, ) -> Result<(), VaultError>

Source§

impl SysHandler<'_>

Source

pub async fn raft_config(&self) -> Result<RaftConfig, VaultError>

Source

pub async fn raft_autopilot_state(&self) -> Result<AutopilotState, VaultError>

Source

pub async fn raft_remove_peer(&self, server_id: &str) -> Result<(), VaultError>

Source

pub async fn raft_snapshot(&self) -> Result<Vec<u8>, VaultError>

Take a Raft snapshot, returning the raw snapshot bytes

Source

pub async fn raft_snapshot_restore( &self, snapshot: &[u8], ) -> Result<(), VaultError>

Restore a Raft snapshot from raw bytes

Source§

impl SysHandler<'_>

Source§

impl SysHandler<'_>

Source

pub async fn seal_status(&self) -> Result<SealStatus, VaultError>

Source

pub async fn seal(&self) -> Result<(), VaultError>

Source

pub async fn unseal(&self, key: &SecretString) -> Result<SealStatus, VaultError>

Source

pub async fn init( &self, params: &InitParams, ) -> Result<InitResponse, VaultError>

Source

pub async fn step_down(&self) -> Result<(), VaultError>

Source§

impl SysHandler<'_>

Source

pub async fn unwrap<T: DeserializeOwned>( &self, token: &SecretString, ) -> Result<T, VaultError>

Source

pub async fn unwrap_str<T: DeserializeOwned>( &self, token: &str, ) -> Result<T, VaultError>

Convenience wrapper that accepts a plain &str token

Source

pub async fn wrap_lookup( &self, token: &SecretString, ) -> Result<WrapInfo, VaultError>

Source

pub async fn capabilities( &self, token: &SecretString, paths: &[&str], ) -> Result<HashMap<String, Vec<String>>, VaultError>

Source

pub async fn capabilities_self( &self, paths: &[&str], ) -> Result<HashMap<String, Vec<String>>, VaultError>

Source

pub async fn key_status(&self) -> Result<KeyStatus, VaultError>

Source

pub async fn rotate_encryption_key(&self) -> Result<(), VaultError>

Trait Implementations§

Source§

impl<'a> Debug for SysHandler<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl SysOperations for SysHandler<'_>

Source§

async fn health(&self) -> Result<HealthResponse, VaultError>

Source§

async fn leader(&self) -> Result<LeaderResponse, VaultError>

Source§

async fn seal_status(&self) -> Result<SealStatus, VaultError>

Source§

async fn seal(&self) -> Result<(), VaultError>

Source§

async fn unseal(&self, key: &SecretString) -> Result<SealStatus, VaultError>

Source§

async fn init(&self, params: &InitParams) -> Result<InitResponse, VaultError>

Source§

async fn step_down(&self) -> Result<(), VaultError>

Source§

async fn list_mounts(&self) -> Result<HashMap<String, MountInfo>, VaultError>

Source§

async fn mount( &self, path: &str, params: &MountParams, ) -> Result<(), VaultError>

Source§

async fn unmount(&self, path: &str) -> Result<(), VaultError>

Source§

async fn tune_mount( &self, path: &str, params: &MountTuneParams, ) -> Result<(), VaultError>

Source§

async fn read_mount_tune(&self, path: &str) -> Result<MountConfig, VaultError>

Source§

async fn list_auth_mounts( &self, ) -> Result<HashMap<String, AuthMountInfo>, VaultError>

Source§

async fn enable_auth( &self, path: &str, params: &AuthMountParams, ) -> Result<(), VaultError>

Source§

async fn disable_auth(&self, path: &str) -> Result<(), VaultError>

Source§

async fn read_auth_tune(&self, path: &str) -> Result<MountConfig, VaultError>

Source§

async fn list_policies(&self) -> Result<Vec<String>, VaultError>

Source§

async fn read_policy(&self, name: &str) -> Result<PolicyInfo, VaultError>

Source§

async fn write_policy(&self, name: &str, rules: &str) -> Result<(), VaultError>

Source§

async fn delete_policy(&self, name: &str) -> Result<(), VaultError>

Source§

async fn read_lease(&self, lease_id: &str) -> Result<LeaseInfo, VaultError>

Source§

async fn renew_lease( &self, lease_id: &str, increment: Option<&str>, ) -> Result<LeaseRenewal, VaultError>

Source§

async fn revoke_lease(&self, lease_id: &str) -> Result<(), VaultError>

Source§

async fn revoke_prefix(&self, prefix: &str) -> Result<(), VaultError>

Source§

async fn list_audit_devices( &self, ) -> Result<HashMap<String, AuditDevice>, VaultError>

Source§

async fn enable_audit( &self, path: &str, params: &AuditParams, ) -> Result<(), VaultError>

Source§

async fn disable_audit(&self, path: &str) -> Result<(), VaultError>

Source§

async fn unwrap<T: DeserializeOwned + Send>( &self, token: &SecretString, ) -> Result<T, VaultError>

Source§

async fn wrap_lookup( &self, token: &SecretString, ) -> Result<WrapInfo, VaultError>

Source§

async fn capabilities( &self, token: &SecretString, paths: &[&str], ) -> Result<HashMap<String, Vec<String>>, VaultError>

Source§

async fn capabilities_self( &self, paths: &[&str], ) -> Result<HashMap<String, Vec<String>>, VaultError>

Source§

async fn key_status(&self) -> Result<KeyStatus, VaultError>

Source§

async fn rotate_encryption_key(&self) -> Result<(), VaultError>

Source§

async fn list_plugins( &self, plugin_type: &str, ) -> Result<Vec<String>, VaultError>

Source§

async fn read_plugin( &self, plugin_type: &str, name: &str, ) -> Result<PluginInfo, VaultError>

Source§

async fn register_plugin( &self, params: &RegisterPluginRequest, ) -> Result<(), VaultError>

Source§

async fn deregister_plugin( &self, plugin_type: &str, name: &str, ) -> Result<(), VaultError>

Source§

async fn reload_plugin(&self, plugin: &str) -> Result<(), VaultError>

Source§

async fn raft_config(&self) -> Result<RaftConfig, VaultError>

Source§

async fn raft_autopilot_state(&self) -> Result<AutopilotState, VaultError>

Source§

async fn raft_remove_peer(&self, server_id: &str) -> Result<(), VaultError>

Source§

async fn raft_snapshot(&self) -> Result<Vec<u8>, VaultError>

Source§

async fn raft_snapshot_restore(&self, snapshot: &[u8]) -> Result<(), VaultError>

Source§

async fn in_flight_requests( &self, ) -> Result<HashMap<String, InFlightRequest>, VaultError>

Source§

async fn list_namespaces(&self) -> Result<Vec<String>, VaultError>

Source§

async fn create_namespace( &self, path: &str, ) -> Result<NamespaceInfo, VaultError>

Source§

async fn delete_namespace(&self, path: &str) -> Result<(), VaultError>

Source§

async fn list_rate_limit_quotas(&self) -> Result<Vec<String>, VaultError>

Source§

async fn read_rate_limit_quota( &self, name: &str, ) -> Result<RateLimitQuota, VaultError>

Source§

async fn write_rate_limit_quota( &self, name: &str, params: &RateLimitQuotaRequest, ) -> Result<(), VaultError>

Source§

async fn delete_rate_limit_quota(&self, name: &str) -> Result<(), VaultError>

Source§

async fn rekey_init( &self, params: &RekeyInitRequest, ) -> Result<RekeyStatus, VaultError>

Source§

async fn rekey_status(&self) -> Result<RekeyStatus, VaultError>

Source§

async fn rekey_cancel(&self) -> Result<(), VaultError>

Source§

async fn rekey_update( &self, key: &SecretString, nonce: &str, ) -> Result<RekeyStatus, VaultError>

Source§

async fn generate_root_init( &self, params: &GenerateRootInitRequest, ) -> Result<GenerateRootStatus, VaultError>

Source§

async fn generate_root_status(&self) -> Result<GenerateRootStatus, VaultError>

Source§

async fn generate_root_cancel(&self) -> Result<(), VaultError>

Source§

async fn generate_root_update( &self, key: &SecretString, nonce: &str, ) -> Result<GenerateRootStatus, VaultError>

Source§

async fn remount( &self, from: &str, to: &str, ) -> Result<RemountStatus, VaultError>

Source§

async fn metrics_json(&self) -> Result<Value, VaultError>

Source§

async fn host_info(&self) -> Result<HostInfo, VaultError>

Source§

async fn internal_counters_activity(&self) -> Result<Value, VaultError>

Source§

async fn version_history(&self) -> Result<Vec<VersionHistoryEntry>, VaultError>

Source§

async fn rewrap(&self, token: &SecretString) -> Result<WrapInfo, VaultError>

Auto Trait Implementations§

§

impl<'a> Freeze for SysHandler<'a>

§

impl<'a> !RefUnwindSafe for SysHandler<'a>

§

impl<'a> Send for SysHandler<'a>

§

impl<'a> Sync for SysHandler<'a>

§

impl<'a> Unpin for SysHandler<'a>

§

impl<'a> UnsafeUnpin for SysHandler<'a>

§

impl<'a> !UnwindSafe for SysHandler<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more