Skip to main content

fr_rust/
lib.rs

1// ==========================================
2// 1. Module Declarations
3// ==========================================
4
5pub mod crypto;
6pub mod db;
7pub mod ddos;
8pub mod email;
9pub mod jwt;
10pub mod linkv;
11pub mod otp;
12pub mod redis;
13pub mod res;
14pub mod server;
15pub mod types;
16pub mod utils;
17pub mod ws;
18pub use actix_web::main;
19
20// ==========================================
21// 2. The Framework Prelude
22// ==========================================
23pub mod prelude {
24    // --------------------------------------
25    // Standard Library Re-exports
26    // --------------------------------------
27    pub use std::{collections::HashMap, env, io::Result as IoResult, sync::Arc};
28
29    // --------------------------------------
30    // Internal Library Re-exports
31    // --------------------------------------
32    pub use crate::crypto::{self, CryptoService};
33    pub use crate::db::{self, DbPool};
34    pub use crate::ddos::{self, DdosConfig, DdosShield};
35    pub use crate::email::{self, EmailConfig, EmailData, EmailService};
36    pub use crate::jwt::{self, Jwt};
37    pub use crate::linkv::{self, LinkV, LinkVConfig};
38    pub use crate::otp::{self, OtpConfig, OtpService};
39    pub use crate::redis::{self, RedisManager, RedisManagerError};
40    pub use crate::res::{
41        self, http_bad, http_bad_json, http_ok, http_ok_json, send_file, send_json, send_str,
42        upload_file,
43    };
44    pub use crate::server::{self, env_var, env_var_or_default, load_env};
45    pub use crate::types::{self, FileRlt, MainRlt, Rlt, RltRsp, Rsp, Rqs};
46    pub use crate::ws::{self, UserMsg, WsConfig, WsManager};
47    pub use crate::utils::{
48        self,
49        utils::{generate_token, input},
50    };
51}