Skip to main content

Module models

Module models 

Source

Structs§

AiIngest
Payload an AI worker POSTs to ingest detections (and optionally an event) for a camera.
AiTask
A perception task to run on a camera (consumed by AI workers).
AiTaskCreate
AiTaskUpdate
ApiKey
ApiKeyCreate
ApiKeyView
ArchiveExportRequest
Request body for POST /api/v1/archive/export — zip a selection of recorded footage on demand.
BackupDestination
A backup transfer target. config is a kind-specific JSON blob (credentials live here and are never serialized raw — use BackupDestinationView). Not Serialize for exactly that reason.
BackupDestinationCreate
BackupDestinationUpdate
BackupDestinationView
Client-facing destination: secret config values are replaced with ***.
BackupJob
A single backup run (policy-scheduled, manually triggered, or an on-demand archive export).
BackupPolicy
A scheduled backup policy: ship a camera selection’s recent footage to a destination on an interval.
BackupPolicyCreate
BackupPolicyUpdate
BackupTestResult
Result of POST /api/v1/backup/destinations/{id}/test (a connectivity / writability probe).
Camera
Camera row as stored. password is never serialized to clients; use CameraView for output.
CameraCreate
Payload to create a camera. id may be omitted (slug auto-derived from name).
CameraOnvif
Per-camera ONVIF device profile, populated by crate::services::onvif::probe. scopes is a JSON array of ONVIF scope URIs. ptz_enabled is true when the device exposes a PTZ service and the chosen media profile carries a PTZConfiguration.
CameraStatus
CameraUpdate
Partial update; only present fields are changed.
CameraView
Client-facing camera representation: credentials stripped, stream URLs masked.
Detection
A detection result posted by an AI worker.
DetectionIngest
One detection inside an ingest request.
Event
IngestEvent
Optional event an AI worker can raise alongside its detections.
LoginRequest
PersistedSnapshot
A captured snapshot frame on disk (one file under snapshots_dir/{camera_id}/).
PtzPreset
A PTZ preset fetched from a camera’s ONVIF PTZ service (GetPresets). One row per (camera, token).
RecordSchedule
A recurring per-camera recording window, applied when the camera’s record_mode is scheduled or scheduled_event. days is a JSON array of weekday ints (0=Mon..6=Sun); time_start / time_end are “HH:MM” 24h in the SERVER’s LOCAL timezone (chrono::Local). When time_start > time_end the window wraps past midnight (its early-morning portion is attributed to the day it started on).
RecordScheduleCreate
RecordScheduleUpdate
RecordingGap
A recording gap detected by the indexer (a hole > 3s between consecutive segments). The ANR loop (services/anr.rs) tries to re-fill pending gaps from the camera’s onboard storage. fill_state is pending | filled | failed.
Segment
SnapshotSchedule
A per-camera schedule that captures a live JPEG every interval_seconds.
SnapshotScheduleCreate
SnapshotScheduleUpdate
User
Operator account. password_hash is never serialized; use UserView for output.
UserCreate
UserUpdate
UserView
Zone
A polygon region on a camera; tracked detections crossing it raise enter/exit/dwell events.
ZoneCreate
ZoneEvent
ZoneUpdate

Constants§

BACKUP_SECRET_KEYS
Config keys that hold a secret. Masked in BackupDestinationView (and preserved across an update when the client round-trips the *** placeholder back).

Functions§

mask_backup_config
Mask the secret values in a config blob, returning the masked blob and whether any secret was set.