pub struct PocketBaseStorage { /* private fields */ }Expand description
PocketBase storage backend. Talks to the PocketBase REST API over curl
(matching the rest of PloitMalper’s lightweight HTTP transport) and uses
pbctl for declarative schema management when available.
Implementations§
Source§impl PocketBaseStorage
impl PocketBaseStorage
Trait Implementations§
Source§impl Storage for PocketBaseStorage
impl Storage for PocketBaseStorage
fn kind(&self) -> &str
Source§fn ping(&mut self) -> Result<bool>
fn ping(&mut self) -> Result<bool>
Verify connectivity (PocketBase health / SQLite open + query).
Source§fn ensure_schema(&mut self) -> Result<()>
fn ensure_schema(&mut self) -> Result<()>
Create all required collections/tables if they do not exist.
fn upsert_scan_run(&mut self, run: &ScanRun) -> Result<()>
fn get_scan_run(&mut self, run_id: &str) -> Result<Option<ScanRun>>
fn list_scan_runs(&mut self) -> Result<Vec<ScanRun>>
fn upsert_asset(&mut self, asset: &Asset) -> Result<()>
fn get_asset(&mut self, asset_id: &str) -> Result<Option<Asset>>
fn list_assets(&mut self) -> Result<Vec<Asset>>
fn upsert_service(&mut self, service: &Service) -> Result<()>
fn get_service(&mut self, service_id: &str) -> Result<Option<Service>>
fn list_services_for_asset(&mut self, asset_id: &str) -> Result<Vec<Service>>
fn list_all_services(&mut self) -> Result<Vec<Service>>
fn upsert_finding(&mut self, finding: &Finding) -> Result<()>
fn get_finding(&mut self, finding_id: &str) -> Result<Option<Finding>>
fn list_findings_for_asset(&mut self, asset_id: &str) -> Result<Vec<Finding>>
fn list_all_findings(&mut self) -> Result<Vec<Finding>>
fn add_observation(&mut self, observation: &Observation) -> Result<()>
fn get_observation(&mut self, obs_id: &str) -> Result<Option<Observation>>
fn list_observations_for( &mut self, subject_type: &str, subject_id: &str, ) -> Result<Vec<Observation>>
fn list_all_observations(&mut self) -> Result<Vec<Observation>>
Auto Trait Implementations§
impl Freeze for PocketBaseStorage
impl RefUnwindSafe for PocketBaseStorage
impl Send for PocketBaseStorage
impl Sync for PocketBaseStorage
impl Unpin for PocketBaseStorage
impl UnsafeUnpin for PocketBaseStorage
impl UnwindSafe for PocketBaseStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more