-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1adb6a8
commit b362b4c
Showing
3 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
pub mod entities; | ||
pub mod events; | ||
pub mod events; | ||
pub mod repositories; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use crate::{cves::domain::entities::{cve::Cve, cve_id::CveId}, shared::domain::errors::DomainError}; | ||
use async_trait::async_trait; | ||
|
||
#[async_trait] | ||
pub trait CveRepository: Send + Sync + 'static { | ||
async fn find_by_id(&self, id: &CveId) -> Result<Cve, DomainError>; | ||
async fn create_one(&self, user: &Cve) -> Result<(), DomainError>; | ||
async fn update_one(&self, user: &Cve) -> Result<(), DomainError>; | ||
async fn delete_one(&self, id: &CveId) -> Result<(), DomainError>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pub mod cve_repository; |