package api type BackupRequest struct { Namespace string `json:"namespace"` PVC string `json:"pvc"` Tags []string `json:"tags,omitempty"` Snapshot bool `json:"snapshot"` DryRun bool `json:"dry_run"` } type BackupResponse struct { Driver string `json:"driver,omitempty"` Volume string `json:"volume,omitempty"` Backup string `json:"backup,omitempty"` JobName string `json:"job_name,omitempty"` Namespace string `json:"namespace,omitempty"` Secret string `json:"secret,omitempty"` RequestedBy string `json:"requested_by,omitempty"` DryRun bool `json:"dry_run"` } type RestoreTestRequest struct { Namespace string `json:"namespace"` PVC string `json:"pvc,omitempty"` Snapshot string `json:"snapshot,omitempty"` BackupURL string `json:"backup_url,omitempty"` TargetNamespace string `json:"target_namespace,omitempty"` TargetPVC string `json:"target_pvc,omitempty"` DryRun bool `json:"dry_run"` } type RestoreTestResponse struct { Driver string `json:"driver,omitempty"` Volume string `json:"volume,omitempty"` TargetNamespace string `json:"target_namespace,omitempty"` TargetPVC string `json:"target_pvc,omitempty"` BackupURL string `json:"backup_url,omitempty"` JobName string `json:"job_name,omitempty"` Namespace string `json:"namespace,omitempty"` Secret string `json:"secret,omitempty"` RequestedBy string `json:"requested_by,omitempty"` DryRun bool `json:"dry_run"` } type InventoryResponse struct { GeneratedAt string `json:"generated_at"` Namespaces []NamespaceInventory `json:"namespaces"` } type NamespaceInventory struct { Name string `json:"name"` PVCs []PVCInventory `json:"pvcs"` } type PVCInventory struct { Namespace string `json:"namespace"` PVC string `json:"pvc"` Volume string `json:"volume,omitempty"` Phase string `json:"phase,omitempty"` StorageClass string `json:"storage_class,omitempty"` Capacity string `json:"capacity,omitempty"` AccessModes []string `json:"access_modes,omitempty"` Driver string `json:"driver,omitempty"` LastBackupAt string `json:"last_backup_at,omitempty"` LastBackupAgeHours float64 `json:"last_backup_age_hours,omitempty"` BackupCount int `json:"backup_count"` CompletedBackups int `json:"completed_backups"` LastBackupSizeBytes float64 `json:"last_backup_size_bytes,omitempty"` TotalBackupSizeBytes float64 `json:"total_backup_size_bytes,omitempty"` Healthy bool `json:"healthy"` HealthReason string `json:"health_reason,omitempty"` Error string `json:"error,omitempty"` } type BackupListResponse struct { Namespace string `json:"namespace"` PVC string `json:"pvc"` Volume string `json:"volume"` Backups []BackupRecord `json:"backups"` } type BackupRecord struct { Name string `json:"name"` SnapshotName string `json:"snapshot_name,omitempty"` Created string `json:"created,omitempty"` State string `json:"state,omitempty"` URL string `json:"url,omitempty"` Size string `json:"size,omitempty"` Latest bool `json:"latest,omitempty"` } type AuthInfoResponse struct { Authenticated bool `json:"authenticated"` User string `json:"user,omitempty"` Email string `json:"email,omitempty"` Groups []string `json:"groups,omitempty"` } type BackupPolicy struct { ID string `json:"id"` Namespace string `json:"namespace"` PVC string `json:"pvc,omitempty"` IntervalHours float64 `json:"interval_hours"` Enabled bool `json:"enabled"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` } type BackupPolicyUpsertRequest struct { Namespace string `json:"namespace"` PVC string `json:"pvc,omitempty"` IntervalHours float64 `json:"interval_hours"` Enabled *bool `json:"enabled,omitempty"` } type BackupPolicyListResponse struct { Policies []BackupPolicy `json:"policies"` } type NamespaceBackupRequest struct { Namespace string `json:"namespace"` DryRun bool `json:"dry_run"` } type NamespaceBackupResult struct { Namespace string `json:"namespace"` PVC string `json:"pvc"` Status string `json:"status"` Volume string `json:"volume,omitempty"` Backup string `json:"backup,omitempty"` Error string `json:"error,omitempty"` } type NamespaceBackupResponse struct { Namespace string `json:"namespace"` RequestedBy string `json:"requested_by,omitempty"` Driver string `json:"driver"` DryRun bool `json:"dry_run"` Total int `json:"total"` Succeeded int `json:"succeeded"` Failed int `json:"failed"` Results []NamespaceBackupResult `json:"results"` } type NamespaceRestoreRequest struct { Namespace string `json:"namespace"` TargetNamespace string `json:"target_namespace,omitempty"` TargetPrefix string `json:"target_prefix,omitempty"` Snapshot string `json:"snapshot,omitempty"` DryRun bool `json:"dry_run"` } type NamespaceRestoreResult struct { Namespace string `json:"namespace"` PVC string `json:"pvc"` TargetNamespace string `json:"target_namespace"` TargetPVC string `json:"target_pvc"` Status string `json:"status"` Volume string `json:"volume,omitempty"` BackupURL string `json:"backup_url,omitempty"` Error string `json:"error,omitempty"` } type NamespaceRestoreResponse struct { Namespace string `json:"namespace"` TargetNamespace string `json:"target_namespace"` RequestedBy string `json:"requested_by,omitempty"` Driver string `json:"driver"` DryRun bool `json:"dry_run"` Total int `json:"total"` Succeeded int `json:"succeeded"` Failed int `json:"failed"` Results []NamespaceRestoreResult `json:"results"` } type B2UsageResponse struct { Enabled bool `json:"enabled"` Available bool `json:"available"` Endpoint string `json:"endpoint,omitempty"` Region string `json:"region,omitempty"` ScannedAt string `json:"scanned_at,omitempty"` ScanDurationMS int64 `json:"scan_duration_ms,omitempty"` TotalObjects int64 `json:"total_objects"` TotalBytes int64 `json:"total_bytes"` RecentObjects24h int64 `json:"recent_objects_24h"` RecentBytes24h int64 `json:"recent_bytes_24h"` Buckets []B2BucketUsage `json:"buckets,omitempty"` Error string `json:"error,omitempty"` } type B2BucketUsage struct { Name string `json:"name"` ObjectCount int64 `json:"object_count"` TotalBytes int64 `json:"total_bytes"` RecentObjects24h int64 `json:"recent_objects_24h"` RecentBytes24h int64 `json:"recent_bytes_24h"` LastModifiedAt string `json:"last_modified_at,omitempty"` }