[][src]Trait t_rust_less_lib::service::TrustlessService

pub trait TrustlessService: Debug {
    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) -> ServiceResult<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],
        display_name: &str
    ) -> ServiceResult<Arc<dyn ClipboardControl>>;
fn add_event_handler(
        &self,
        handler: Box<dyn EventHandler>
    ) -> ServiceResult<Box<dyn EventSubscription>>;
fn generate_id(&self) -> ServiceResult<String>;
fn generate_password(
        &self,
        param: PasswordGeneratorParam
    ) -> ServiceResult<String>;
fn check_autolock(&self); }

Main entrypoint for all interactions with the t-rust-less system

Required methods

fn list_stores(&self) -> ServiceResult<Vec<StoreConfig>>

List all store configurations

fn upsert_store_config(&self, store_config: StoreConfig) -> ServiceResult<()>

Create or update a store configuration

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)

fn open_store(&self, name: &str) -> ServiceResult<Arc<dyn SecretsStore>>

Open a store

fn get_default_store(&self) -> ServiceResult<Option<String>>

Get the name of the store that should be opened by default

fn set_default_store(&self, name: &str) -> ServiceResult<()>

Set the name of the store that should be opened by default

fn secret_to_clipboard(
    &self,
    store_name: &str,
    block_id: &str,
    properties: &[&str],
    display_name: &str
) -> ServiceResult<Arc<dyn ClipboardControl>>

fn add_event_handler(
    &self,
    handler: Box<dyn EventHandler>
) -> ServiceResult<Box<dyn EventSubscription>>

fn generate_id(&self) -> ServiceResult<String>

fn generate_password(
    &self,
    param: PasswordGeneratorParam
) -> ServiceResult<String>

fn check_autolock(&self)

Loading content...

Implementors

impl TrustlessService for LocalTrustlessService[src]

Loading content...