Struct bonsaidb::keystorage::s3::S3VaultKeyStorage
source · pub struct S3VaultKeyStorage {
pub endpoint: Option<String>,
pub region: Option<Region>,
pub path: String,
/* private fields */
}
Expand description
S3-compatible VaultKeyStorage
implementor.
Fields§
§endpoint: Option<String>
The S3 endpoint to use. If not specified, the endpoint will be determined automatically. This field can be used to support non-AWS S3 providers.
region: Option<Region>
The AWS region to use. If not specified, the region will be determined by the aws sdk.
path: String
The path prefix for keys to be stored within.
Implementations§
source§impl S3VaultKeyStorage
impl S3VaultKeyStorage
sourcepub fn new(bucket: impl Display) -> S3VaultKeyStorage
pub fn new(bucket: impl Display) -> S3VaultKeyStorage
Creates a new key storage instance for bucket
. This instance will use
the currently available Tokio runtime or create one if none is
available.
sourcepub fn new_with_runtime(
bucket: impl Display,
runtime: Handle
) -> S3VaultKeyStorage
pub fn new_with_runtime( bucket: impl Display, runtime: Handle ) -> S3VaultKeyStorage
Creates a new key storage instance for bucket
, which performs its
networking operations on runtime
.
sourcepub fn path(self, prefix: impl Display) -> S3VaultKeyStorage
pub fn path(self, prefix: impl Display) -> S3VaultKeyStorage
Sets the path prefix for vault keys to be stored within.
sourcepub fn endpoint(self, endpoint: impl Into<String>) -> S3VaultKeyStorage
pub fn endpoint(self, endpoint: impl Into<String>) -> S3VaultKeyStorage
Sets the endpoint to use. See Self::endpoint
for more information.
Trait Implementations§
source§impl Debug for S3VaultKeyStorage
impl Debug for S3VaultKeyStorage
source§impl Default for S3VaultKeyStorage
impl Default for S3VaultKeyStorage
source§fn default() -> S3VaultKeyStorage
fn default() -> S3VaultKeyStorage
Returns the “default value” for a type. Read more
source§impl VaultKeyStorage for S3VaultKeyStorage
impl VaultKeyStorage for S3VaultKeyStorage
source§fn set_vault_key_for(
&self,
storage_id: StorageId,
key: KeyPair
) -> Result<(), <S3VaultKeyStorage as VaultKeyStorage>::Error>
fn set_vault_key_for( &self, storage_id: StorageId, key: KeyPair ) -> Result<(), <S3VaultKeyStorage as VaultKeyStorage>::Error>
Store a key. Each server id should have unique storage.
source§fn vault_key_for(
&self,
storage_id: StorageId
) -> Result<Option<KeyPair>, <S3VaultKeyStorage as VaultKeyStorage>::Error>
fn vault_key_for( &self, storage_id: StorageId ) -> Result<Option<KeyPair>, <S3VaultKeyStorage as VaultKeyStorage>::Error>
Retrieve all previously stored vault key for a given storage id.
Auto Trait Implementations§
impl !RefUnwindSafe for S3VaultKeyStorage
impl Send for S3VaultKeyStorage
impl Sync for S3VaultKeyStorage
impl Unpin for S3VaultKeyStorage
impl !UnwindSafe for S3VaultKeyStorage
Blanket Implementations§
source§impl<T> AnyVaultKeyStorage for Twhere
T: VaultKeyStorage + 'static,
impl<T> AnyVaultKeyStorage for Twhere
T: VaultKeyStorage + 'static,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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