-
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
3bca102
commit 268e9d7
Showing
1 changed file
with
3 additions
and
4 deletions.
There are no files selected for viewing
7 changes: 3 additions & 4 deletions
7
libs/cti/src/breaches/domain/repositories/breach_repository.rs
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,13 +1,12 @@ | ||
use crate::{ | ||
breaches::domain::entities::{breach::Breach, breach_id::BreachId}, | ||
shared::domain::errors::DomainError, | ||
breaches::domain::entities::{breach::Breach, breach_product::BreachProduct, breach_product_version::BreachProductVersion, breach_vendor::BreachVendor}, cves::domain::entities::cve_id::CveId, shared::domain::errors::DomainError | ||
}; | ||
use async_trait::async_trait; | ||
|
||
#[async_trait] | ||
pub trait BreachRepository: Send + Sync + 'static { | ||
async fn find_by_id(&self, id: &BreachId) -> Result<Breach, DomainError>; | ||
async fn find_one(&self, cve_id: &CveId, vendor: BreachVendor, product: BreachProduct, product_version: BreachProductVersion) -> Result<Breach, DomainError>; | ||
async fn create_one(&self, breach: &Breach) -> Result<(), DomainError>; | ||
async fn update_one(&self, breach: &Breach) -> Result<(), DomainError>; | ||
async fn delete_one(&self, id: &BreachId) -> Result<(), DomainError>; | ||
async fn delete_one(&self, cve_id: &CveId, vendor: BreachVendor, product: BreachProduct, product_version: BreachProductVersion) -> Result<(), DomainError>; | ||
} |