1 use lemmy_db_schema::{source::secret::Secret, utils::DbPool};
3 rate_limit::RateLimitCell,
4 settings::{structs::Settings, SETTINGS},
6 use reqwest_middleware::ClientWithMiddleware;
10 pub struct LemmyContext {
12 client: Arc<ClientWithMiddleware>,
14 rate_limit_cell: RateLimitCell,
20 client: ClientWithMiddleware,
22 rate_limit_cell: RateLimitCell,
26 client: Arc::new(client),
27 secret: Arc::new(secret),
31 pub fn pool(&self) -> &DbPool {
34 pub fn client(&self) -> &ClientWithMiddleware {
37 pub fn settings(&self) -> &'static Settings {
40 pub fn secret(&self) -> &Secret {
43 pub fn settings_updated_channel(&self) -> &RateLimitCell {