pub struct PostgresAdapter;Expand description
PostgreSQL adapter implementing the DatabaseProvider port
This adapter is stateless and accepts connection details via request parameters.
Implementations§
Trait Implementations§
Source§impl DatabaseProvider for PostgresAdapter
impl DatabaseProvider for PostgresAdapter
Source§fn create_database<'life0, 'async_trait>(
&'life0 self,
request: DatabaseCreateRequest,
) -> Pin<Box<dyn Future<Output = PortResult<CreatedDatabase>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_database<'life0, 'async_trait>(
&'life0 self,
request: DatabaseCreateRequest,
) -> Pin<Box<dyn Future<Output = PortResult<CreatedDatabase>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a new database Read more
Source§fn drop_database<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
host: &'life2 str,
port: u16,
ssh_key_path: &'life3 str,
) -> Pin<Box<dyn Future<Output = PortResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn drop_database<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
host: &'life2 str,
port: u16,
ssh_key_path: &'life3 str,
) -> Pin<Box<dyn Future<Output = PortResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Drop/delete a database Read more
Source§fn list_databases<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
host: &'life1 str,
port: u16,
ssh_key_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = PortResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_databases<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
host: &'life1 str,
port: u16,
ssh_key_path: &'life2 str,
) -> Pin<Box<dyn Future<Output = PortResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List all databases Read more
Source§fn database_exists<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
host: &'life2 str,
port: u16,
ssh_key_path: &'life3 str,
) -> Pin<Box<dyn Future<Output = PortResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn database_exists<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
name: &'life1 str,
host: &'life2 str,
port: u16,
ssh_key_path: &'life3 str,
) -> Pin<Box<dyn Future<Output = PortResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Check if a database exists Read more
Source§fn create_user<'life0, 'async_trait>(
&'life0 self,
request: DatabaseUserRequest,
) -> Pin<Box<dyn Future<Output = PortResult<DatabaseUser>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_user<'life0, 'async_trait>(
&'life0 self,
request: DatabaseUserRequest,
) -> Pin<Box<dyn Future<Output = PortResult<DatabaseUser>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a database user Read more
Source§fn drop_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
username: &'life1 str,
host: &'life2 str,
port: u16,
ssh_key_path: &'life3 str,
) -> Pin<Box<dyn Future<Output = PortResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn drop_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
username: &'life1 str,
host: &'life2 str,
port: u16,
ssh_key_path: &'life3 str,
) -> Pin<Box<dyn Future<Output = PortResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Drop/delete a database user Read more
Source§fn grant_privileges<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
database: &'life1 str,
username: &'life2 str,
host: &'life3 str,
port: u16,
ssh_key_path: &'life4 str,
) -> Pin<Box<dyn Future<Output = PortResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn grant_privileges<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
database: &'life1 str,
username: &'life2 str,
host: &'life3 str,
port: u16,
ssh_key_path: &'life4 str,
) -> Pin<Box<dyn Future<Output = PortResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Grant all privileges on a database to a user Read more
Auto Trait Implementations§
impl Freeze for PostgresAdapter
impl RefUnwindSafe for PostgresAdapter
impl Send for PostgresAdapter
impl Sync for PostgresAdapter
impl Unpin for PostgresAdapter
impl UnwindSafe for PostgresAdapter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more