openauth-tokio-postgres 0.0.5

tokio-postgres database adapter for OpenAuth.
Documentation
1
2
3
4
5
6
7
8
9
use openauth_core::error::OpenAuthError;

pub fn postgres_error(error: tokio_postgres::Error) -> OpenAuthError {
    OpenAuthError::Adapter(format!("tokio-postgres error: {error}"))
}

pub fn json_error(error: serde_json::Error) -> OpenAuthError {
    OpenAuthError::Adapter(format!("tokio-postgres JSON error: {error}"))
}