use std::sync::Arc; use tokio::sync::Mutex; mod postgres; mod redisdb; mod bingo_user; mod oauth_state; mod oauth_token; pub mod id; pub mod structs; pub struct DbContext { pg_pool: Option, redis_pool: Option>, } impl DbContext { pub fn new() -> Self { DbContext { pg_pool: None, redis_pool: None, } } pub async fn connect(&mut self) { self.pg_connect().await; self.redis_connect().await; } } pub type Context = Arc>;