Trait holochain::prelude::kitsune_p2p::dependencies::kitsune_p2p_types::dependencies::lair_keystore_api::lair_store::traits::AsLairStore
source · pub trait AsLairStore: 'static + Send + Sync {
// Required methods
fn get_bidi_ctx_key(&self) -> BufReadSized<32>;
fn list_entries(
&self
) -> Pin<Box<dyn Future<Output = Result<Vec<LairEntryInfo>, OneErr>> + Send>>;
fn write_entry(
&self,
entry: Arc<LairEntryInner>
) -> Pin<Box<dyn Future<Output = Result<(), OneErr>> + Send>>;
fn get_entry_by_tag(
&self,
tag: Arc<str>
) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>;
fn get_entry_by_ed25519_pub_key(
&self,
ed25519_pub_key: BinDataSized<32>
) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>;
fn get_entry_by_x25519_pub_key(
&self,
x25519_pub_key: BinDataSized<32>
) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>;
}
Expand description
Defines a lair storage mechanism.
Required Methods§
sourcefn get_bidi_ctx_key(&self) -> BufReadSized<32>
fn get_bidi_ctx_key(&self) -> BufReadSized<32>
Return the context key for both encryption and decryption of secret data within the store that is NOT deep_locked.
sourcefn list_entries(
&self
) -> Pin<Box<dyn Future<Output = Result<Vec<LairEntryInfo>, OneErr>> + Send>>
fn list_entries( &self ) -> Pin<Box<dyn Future<Output = Result<Vec<LairEntryInfo>, OneErr>> + Send>>
List the entries tracked by the lair store.
sourcefn write_entry(
&self,
entry: Arc<LairEntryInner>
) -> Pin<Box<dyn Future<Output = Result<(), OneErr>> + Send>>
fn write_entry( &self, entry: Arc<LairEntryInner> ) -> Pin<Box<dyn Future<Output = Result<(), OneErr>> + Send>>
Write a new entry to the lair store. Should error if the tag already exists.
sourcefn get_entry_by_tag(
&self,
tag: Arc<str>
) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>
fn get_entry_by_tag( &self, tag: Arc<str> ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>
Get an entry from the lair store by tag.
sourcefn get_entry_by_ed25519_pub_key(
&self,
ed25519_pub_key: BinDataSized<32>
) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>
fn get_entry_by_ed25519_pub_key( &self, ed25519_pub_key: BinDataSized<32> ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>
Get an entry from the lair store by ed25519 pub key.
sourcefn get_entry_by_x25519_pub_key(
&self,
x25519_pub_key: BinDataSized<32>
) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>
fn get_entry_by_x25519_pub_key( &self, x25519_pub_key: BinDataSized<32> ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>
Get an entry from the lair store by x25519 pub key.