pub mod app;
pub mod router;
pub mod middleware;
pub mod jwt;
pub mod response;
pub mod extract;
pub mod resources;
pub use app::App;
pub use router::AlunRouter;
pub use response::{Res, ResResult, ApiError, PageData};
pub use middleware::{UserId, AuthClaims, AuthLayer, RequireRoleLayer, RequirePermissionLayer, TokenClaims, TokenType};
pub use jwt::JWT;
pub use extract::ValidatedJson;
#[cfg(feature = "db")]
pub use crate::resources::{db, try_db, set_db};
#[cfg(feature = "cache")]
pub use crate::resources::{cache, try_cache, set_cache};
pub use crate::resources::{cfg, config, try_config, set_config};
#[cfg(feature = "template")]
pub use crate::resources::{render_template, try_template, set_template};
pub use crate::resources::{
set_upload_path, upload_path, try_upload_path,
set_download_path, download_path, try_download_path,
};
#[linkme::distributed_slice]
pub static ROUTES: [fn(&mut AlunRouter)] = [..];
#[derive(Debug, Clone)]
pub struct PermissionDef {
pub path: &'static str,
pub method: &'static str,
pub permission: &'static str,
}
#[linkme::distributed_slice]
pub static PERMISSION_ROUTES: [PermissionDef] = [..];
#[derive(Debug, Clone)]
pub struct NoAuthDef {
pub path: &'static str,
}
#[linkme::distributed_slice]
pub static NO_AUTH_ROUTES: [NoAuthDef] = [..];