1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! Scanning backend implementations.
//!
//! This module contains implementations of the `Scanner` trait for
//! various malware scanning engines.
//!
//! ## Available Backends
//!
//! - [`mock`] - A mock scanner for testing
//! - [`clamav`] - ClamAV via socket protocol (requires `clamav` feature)
//! - [`virustotal`] - VirusTotal REST API (requires `virustotal` feature)
//!
//! ## Implementing a Custom Backend
//!
//! To add a new scanning engine, implement the `Scanner` trait:
//!
//! ```rust,ignore
//! use scanbridge::core::{Scanner, ScanResult, ScanError, FileInput};
//! use async_trait::async_trait;
//!
//! #[derive(Debug)]
//! pub struct MyScanner {
//! // Your scanner's configuration
//! }
//!
//! #[async_trait]
//! impl Scanner for MyScanner {
//! fn name(&self) -> &str {
//! "my-scanner"
//! }
//!
//! async fn scan(&self, input: &FileInput) -> Result<ScanResult, ScanError> {
//! // Implement scanning logic
//! todo!()
//! }
//!
//! async fn health_check(&self) -> Result<(), ScanError> {
//! // Implement health check
//! Ok(())
//! }
//! }
//! ```
// Re-exports
pub use MockScanner;
pub use ClamAvScanner;
pub use VirusTotalScanner;