Skip to content

Commit

Permalink
update breach accesses
Browse files Browse the repository at this point in the history
  • Loading branch information
n1nj4t4nuk1 committed Dec 15, 2024
1 parent 3bca102 commit 268e9d7
Showing 1 changed file with 3 additions and 4 deletions.
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>;
}

0 comments on commit 268e9d7

Please sign in to comment.