this repo has no description
at main 49 lines 1.5 kB view raw
1extern crate core; 2 3use crate::atrium::dns_resolver::HickoryDnsTxtResolver; 4use crate::atrium::stores::{AtriumSessionStore, AtriumStateStore}; 5use atrium_api::agent::atp_agent::AtpAgent; 6use atrium_api::{ 7 agent::Agent, agent::atp_agent::store::MemorySessionStore, 8}; 9use atrium_identity::did::CommonDidResolver; 10use atrium_identity::handle::AtprotoHandleResolver; 11use atrium_oauth::{DefaultHttpClient, OAuthClient}; 12use atrium_xrpc_client::reqwest::ReqwestClient; 13use std::sync::Arc; 14 15pub mod advent; 16pub mod assets; 17pub mod atrium; 18pub mod cache; 19pub mod db; 20pub mod models; 21pub mod web_helpers; 22 23#[rustfmt::skip] 24pub mod lexicons; 25 26/// OAuthClientType to make it easier to access the OAuthClient in web requests 27pub type OAuthClientType = Arc< 28 OAuthClient< 29 AtriumStateStore, 30 AtriumSessionStore, 31 CommonDidResolver<DefaultHttpClient>, 32 AtprotoHandleResolver<HickoryDnsTxtResolver, DefaultHttpClient>, 33 >, 34>; 35 36/// HandleResolver type to make it easier to access the resolver in web requests 37pub type HandleResolver = Arc<CommonDidResolver<DefaultHttpClient>>; 38 39/// The agent(what makes atproto calls) 40pub type OAuthAgentType = Agent< 41 atrium_oauth::OAuthSession< 42 DefaultHttpClient, 43 CommonDidResolver<DefaultHttpClient>, 44 AtprotoHandleResolver<HickoryDnsTxtResolver, DefaultHttpClient>, 45 AtriumSessionStore, 46 >, 47>; 48 49pub type PasswordAgent = Arc<AtpAgent<MemorySessionStore, ReqwestClient>>;