Trait ProxyDatabase

Source
pub trait ProxyDatabase:
    Debug
    + Send
    + Sync {
    // Required methods
    fn load_providers_from_database<'life0, 'life1, 'async_trait>(
        &'life0 self,
        providers_table: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<DbProvider>, Report<Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn load_aliases_from_database<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        alias_table: &'life1 str,
        providers_table: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<AliasConfig>, Report<Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn load_api_key_configs_from_database<'life0, 'life1, 'async_trait>(
        &'life0 self,
        table: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ApiKeyConfig>, Report<Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn write_log_batch<'life0, 'async_trait>(
        &'life0 self,
        items: Vec<ProxyLogEntry>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A DBMS-agnostic interface to a database

Required Methods§

Source

fn load_providers_from_database<'life0, 'life1, 'async_trait>( &'life0 self, providers_table: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<DbProvider>, Report<Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Load provider configuration from the database

Source

fn load_aliases_from_database<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, alias_table: &'life1 str, providers_table: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<AliasConfig>, Report<Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Load alias configuration from the database

Source

fn load_api_key_configs_from_database<'life0, 'life1, 'async_trait>( &'life0 self, table: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<ApiKeyConfig>, Report<Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Load API key configuration from the database

Source

fn write_log_batch<'life0, 'async_trait>( &'life0 self, items: Vec<ProxyLogEntry>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Write a batch of log entries to the database

Implementors§