pub trait TrustlessService:
Debug
+ Send
+ Sync {
Show 13 methods
// Required methods
fn list_stores(&self) -> ServiceResult<Vec<StoreConfig>>;
fn upsert_store_config(
&self,
store_config: StoreConfig,
) -> ServiceResult<()>;
fn delete_store_config(&self, name: &str) -> ServiceResult<()>;
fn open_store(&self, name: &str) -> SecretStoreResult<Arc<dyn SecretsStore>>;
fn get_default_store(&self) -> ServiceResult<Option<String>>;
fn set_default_store(&self, name: &str) -> ServiceResult<()>;
fn secret_to_clipboard(
&self,
store_name: &str,
block_id: &str,
properties: &[&str],
) -> ServiceResult<Arc<dyn ClipboardControl>>;
fn poll_events(&self, last_id: u64) -> ServiceResult<Vec<Event>>;
fn generate_id(&self) -> ServiceResult<String>;
fn generate_password(
&self,
param: PasswordGeneratorParam,
) -> ServiceResult<String>;
fn check_autolock(&self);
fn needs_synchronization(&self) -> bool;
fn synchronize(&self) -> Option<DateTime<Utc>>;
}
Expand description
Main entrypoint for all interactions with the t-rust-less system
Required Methods§
Sourcefn list_stores(&self) -> ServiceResult<Vec<StoreConfig>>
fn list_stores(&self) -> ServiceResult<Vec<StoreConfig>>
List all store configurations
Sourcefn upsert_store_config(&self, store_config: StoreConfig) -> ServiceResult<()>
fn upsert_store_config(&self, store_config: StoreConfig) -> ServiceResult<()>
Create or update a store configuration
Sourcefn delete_store_config(&self, name: &str) -> ServiceResult<()>
fn delete_store_config(&self, name: &str) -> ServiceResult<()>
Delete a store configuration (This will only delete the configuration, the store itself will be left untouched)
Sourcefn open_store(&self, name: &str) -> SecretStoreResult<Arc<dyn SecretsStore>>
fn open_store(&self, name: &str) -> SecretStoreResult<Arc<dyn SecretsStore>>
Open a store
Sourcefn get_default_store(&self) -> ServiceResult<Option<String>>
fn get_default_store(&self) -> ServiceResult<Option<String>>
Get the name of the store that should be opened by default
Sourcefn set_default_store(&self, name: &str) -> ServiceResult<()>
fn set_default_store(&self, name: &str) -> ServiceResult<()>
Set the name of the store that should be opened by default