#[async_trait::async_trait]
pub trait WebSecurityScanner: std::fmt::Debug + Send + Sync {
async fn create_scan_config(
&self,
req: crate::model::CreateScanConfigRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ScanConfig>>;
async fn delete_scan_config(
&self,
req: crate::model::DeleteScanConfigRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<()>>;
async fn get_scan_config(
&self,
req: crate::model::GetScanConfigRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ScanConfig>>;
async fn list_scan_configs(
&self,
req: crate::model::ListScanConfigsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListScanConfigsResponse>>;
async fn update_scan_config(
&self,
req: crate::model::UpdateScanConfigRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ScanConfig>>;
async fn start_scan_run(
&self,
req: crate::model::StartScanRunRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ScanRun>>;
async fn get_scan_run(
&self,
req: crate::model::GetScanRunRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ScanRun>>;
async fn list_scan_runs(
&self,
req: crate::model::ListScanRunsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListScanRunsResponse>>;
async fn stop_scan_run(
&self,
req: crate::model::StopScanRunRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ScanRun>>;
async fn list_crawled_urls(
&self,
req: crate::model::ListCrawledUrlsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListCrawledUrlsResponse>>;
async fn get_finding(
&self,
req: crate::model::GetFindingRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::Finding>>;
async fn list_findings(
&self,
req: crate::model::ListFindingsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListFindingsResponse>>;
async fn list_finding_type_stats(
&self,
req: crate::model::ListFindingTypeStatsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListFindingTypeStatsResponse>>;
}
#[async_trait::async_trait]
impl<T: super::WebSecurityScanner> WebSecurityScanner for T {
async fn create_scan_config(
&self,
req: crate::model::CreateScanConfigRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ScanConfig>> {
T::create_scan_config(self, req, options).await
}
async fn delete_scan_config(
&self,
req: crate::model::DeleteScanConfigRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<()>> {
T::delete_scan_config(self, req, options).await
}
async fn get_scan_config(
&self,
req: crate::model::GetScanConfigRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ScanConfig>> {
T::get_scan_config(self, req, options).await
}
async fn list_scan_configs(
&self,
req: crate::model::ListScanConfigsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListScanConfigsResponse>> {
T::list_scan_configs(self, req, options).await
}
async fn update_scan_config(
&self,
req: crate::model::UpdateScanConfigRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ScanConfig>> {
T::update_scan_config(self, req, options).await
}
async fn start_scan_run(
&self,
req: crate::model::StartScanRunRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ScanRun>> {
T::start_scan_run(self, req, options).await
}
async fn get_scan_run(
&self,
req: crate::model::GetScanRunRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ScanRun>> {
T::get_scan_run(self, req, options).await
}
async fn list_scan_runs(
&self,
req: crate::model::ListScanRunsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListScanRunsResponse>> {
T::list_scan_runs(self, req, options).await
}
async fn stop_scan_run(
&self,
req: crate::model::StopScanRunRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ScanRun>> {
T::stop_scan_run(self, req, options).await
}
async fn list_crawled_urls(
&self,
req: crate::model::ListCrawledUrlsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListCrawledUrlsResponse>> {
T::list_crawled_urls(self, req, options).await
}
async fn get_finding(
&self,
req: crate::model::GetFindingRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::Finding>> {
T::get_finding(self, req, options).await
}
async fn list_findings(
&self,
req: crate::model::ListFindingsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListFindingsResponse>> {
T::list_findings(self, req, options).await
}
async fn list_finding_type_stats(
&self,
req: crate::model::ListFindingTypeStatsRequest,
options: crate::RequestOptions,
) -> crate::Result<crate::Response<crate::model::ListFindingTypeStatsResponse>> {
T::list_finding_type_stats(self, req, options).await
}
}