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

source

pub fn new(bucket: impl Display) -> Self

Creates a new key storage instance for bucket. This instance will use the currently available Tokio runtime or create one if none is available.

source

pub fn new_with_runtime(bucket: impl Display, runtime: Handle) -> Self

Creates a new key storage instance for bucket, which performs its networking operations on runtime.

source

pub fn path(self, prefix: impl Display) -> Self

Sets the path prefix for vault keys to be stored within.

source

pub fn endpoint(self, endpoint: impl Into<String>) -> Self

Sets the endpoint to use. See Self::endpoint for more information.

Trait Implementations§

source§

impl Debug for S3VaultKeyStorage

source§

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

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

impl Default for S3VaultKeyStorage

source§

fn default() -> S3VaultKeyStorage

Returns the “default value” for a type. Read more
source§

impl VaultKeyStorage for S3VaultKeyStorage

§

type Error = Error

The error type that the functions return.
source§

fn set_vault_key_for( &self, storage_id: StorageId, key: KeyPair ) -> Result<(), Self::Error>

Store a key. Each server id should have unique storage.
source§

fn vault_key_for( &self, storage_id: StorageId ) -> Result<Option<KeyPair>, Self::Error>

Retrieve all previously stored vault key for a given storage id.

Auto Trait Implementations§

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> AnyVaultKeyStorage for T
where T: VaultKeyStorage + 'static,

source§

fn vault_key_for(&self, server_id: StorageId) -> Result<Option<KeyPair>, Error>

Retrieve all previously stored master keys for a given storage id.
source§

fn set_vault_key_for( &self, server_id: StorageId, key: KeyPair ) -> Result<(), Error>

Store a key. Each server id should have unique storage. The keys are uniquely encrypted per storage id and can only be decrypted by keys contained in the storage itself.
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.

§

impl<T> Instrument for T

§

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

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

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> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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