73f0b0fa47
* make more coherent lifecycles
* remove specific implementation on different handlers (they do not need to know existence of ThumbnailSerice nor AudioMetadataService)
* reduce risk of orphean objects
* ensure additional services are correctly wired (ex: Thumbnail generation was not covering all upload cases)
* more details on docs/architecture/file-and-blob-lifecycle.md :
```rust
// application/ports/file_lifecycle.rs
pub trait FileLifecycleHook {
fn on_file_created(file_id, blob_hash, content_type, is_new_blob);
fn on_file_updated(file_id, blob_hash, content_type);
fn on_file_copied(file_id, blob_hash, content_type, source_id)
fn on_file_deleted(file_id);
}
// application/ports/blob_lifecycle.rs
pub trait BlobLifecycleHook {
fn on_blob_created(blob_hash, content_type);
fn on_blob_deleted(blob_hash);
}
```
42 lines
1.2 KiB
Rust
42 lines
1.2 KiB
Rust
pub mod admin_settings_service;
|
|
pub mod app_password_service;
|
|
pub mod auth_application_service;
|
|
pub mod batch_operations;
|
|
pub mod blob_lifecycle_service;
|
|
pub mod calendar_service;
|
|
pub mod contact_service;
|
|
pub mod device_auth_service;
|
|
pub mod favorites_service;
|
|
pub mod file_lifecycle_service;
|
|
pub mod file_management_service;
|
|
pub mod file_retrieval_service;
|
|
pub mod file_upload_service;
|
|
pub mod file_use_case_factory;
|
|
pub mod folder_service;
|
|
pub mod i18n_application_service;
|
|
pub mod music_service;
|
|
pub mod nextcloud_file_id_service;
|
|
pub mod nextcloud_login_flow_service;
|
|
pub mod recent_service;
|
|
pub mod search_service;
|
|
pub mod share_browse_service;
|
|
pub mod share_service;
|
|
pub mod storage_settings_service;
|
|
pub mod storage_usage_service;
|
|
pub mod trash_service;
|
|
pub mod wopi_lock_service;
|
|
pub mod wopi_token_service;
|
|
|
|
#[cfg(test)]
|
|
mod batch_operations_test;
|
|
#[cfg(test)]
|
|
mod idor_protection_test;
|
|
#[cfg(test)]
|
|
mod trash_service_test;
|
|
|
|
// Re-exportar para facilitar acceso
|
|
pub use file_management_service::FileManagementService;
|
|
pub use file_retrieval_service::FileRetrievalService;
|
|
pub use file_upload_service::FileUploadService;
|
|
pub use file_use_case_factory::AppFileUseCaseFactory;
|