we_trust_postgres/adapter.rs
1use crate::connection::PostgresConnection;
2use tracing::info;
3use yykv_types::DsError;
4
5type Result<T> = std::result::Result<T, DsError>;
6
7pub struct PostgresAdapter;
8
9impl PostgresAdapter {
10 pub async fn connect(url: &str) -> Result<PostgresConnection> {
11 info!("Postgres connecting to: {}", url);
12 Ok(PostgresConnection::new(url.to_string()))
13 }
14}