Refactor and enhance SurrealDB integration and resource management
- Updated `lib.rs` to selectively expose specific entities and services for better clarity. - Improved SurrealDB client initialization with detailed logging in `surrealdb/mod.rs`. - Enhanced resource definitions in `resource.rs` with additional utility methods for better resource management. - Refactored user data retrieval logic in `auth_middleware/mod.rs` for improved readability and efficiency. - Cleaned up middleware exports in `lib.rs` for clearer API surface. - Added detailed comments and documentation throughout the SurrealDB module for better maintainability. - Updated tests to ensure compatibility with new changes and improved structure. - Introduced new permissions module structure in `imphnen-utils` for future enhancements.
This commit is contained in:
+29
-9
@@ -9,15 +9,35 @@ pub mod minio;
|
||||
pub mod services;
|
||||
pub mod surrealdb;
|
||||
|
||||
pub use argon::*;
|
||||
pub use axum::*;
|
||||
pub use enviroment::*;
|
||||
pub use imphnen_entities::*;
|
||||
pub use jsonwebtoken::*;
|
||||
pub use lettre::*;
|
||||
pub use minio::*;
|
||||
pub use services::*;
|
||||
pub use surrealdb::*;
|
||||
pub use argon::{hash_password, verify_password};
|
||||
pub use axum::axum_init;
|
||||
pub use enviroment::{ENV, Env};
|
||||
pub use imphnen_entities::{
|
||||
MessageResponseDto,
|
||||
MetaRequestDto,
|
||||
MetaResponseDto,
|
||||
ResponseSuccessDto,
|
||||
ResponseListSuccessDto,
|
||||
CountResult,
|
||||
Error,
|
||||
ExperienceDto,
|
||||
EducationDto,
|
||||
UsersDetailQueryDto,
|
||||
PermissionsEnum,
|
||||
PermissionsItemDto,
|
||||
PermissionsQueryDto,
|
||||
};
|
||||
pub use jsonwebtoken::{
|
||||
Claims, encode_access_token, encode_refresh_token, decode_access_token,
|
||||
decode_refresh_token, encode_reset_password_token, generate_jwt
|
||||
};
|
||||
pub use lettre::send_email;
|
||||
pub use minio::*; // Minio has many useful exports, keeping for now
|
||||
pub use services::{UserLookupService, AuthRepositoryTrait};
|
||||
pub use surrealdb::{
|
||||
surrealdb_init_ws, surrealdb_init_mem, SurrealWsClient, SurrealMemClient,
|
||||
ResourceEnum
|
||||
};
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct AppState {
|
||||
|
||||
Reference in New Issue
Block a user