package models // StatusResponse represents a simple status-only JSON response. type StatusResponse struct { Status string `json:"status"` } // StatusMessageResponse represents a status + message JSON response. type StatusMessageResponse struct { Status string `json:"status"` Message string `json:"message"` } // ErrorResponse represents a standard error JSON response. type ErrorResponse struct { Status string `json:"status"` Message string `json:"message"` } // AuthLoginRequest represents login payload for LDAP/JWT authentication. type AuthLoginRequest struct { Username string `json:"username"` Password string `json:"password"` } // AuthLoginResponse represents successful auth login response. type AuthLoginResponse struct { AccessToken string `json:"access_token"` ExpiresAt int64 `json:"expires_at"` TokenType string `json:"token_type"` } // AuthMeResponse represents the authenticated identity extracted from JWT claims. type AuthMeResponse struct { Status string `json:"status"` Subject string `json:"subject"` Roles []string `json:"roles,omitempty"` Groups []string `json:"groups,omitempty"` Issuer string `json:"issuer"` Audience string `json:"audience"` IssuedAt int64 `json:"issued_at"` ExpiresAt int64 `json:"expires_at"` NotBefore int64 `json:"not_before"` TokenID string `json:"token_id"` } // SnapshotMigrationStats mirrors the snapshot registry migration stats payload. type SnapshotMigrationStats struct { HourlyRenamed int `json:"HourlyRenamed"` HourlyRegistered int `json:"HourlyRegistered"` DailyRegistered int `json:"DailyRegistered"` MonthlyRegistered int `json:"MonthlyRegistered"` Errors int `json:"Errors"` } // SnapshotMigrationResponse captures snapshot registry migration results. type SnapshotMigrationResponse struct { Status string `json:"status"` Error string `json:"error,omitempty"` Stats SnapshotMigrationStats `json:"stats"` } // SnapshotRegenerateReportsResponse describes the hourly report regeneration response. type SnapshotRegenerateReportsResponse struct { Status string `json:"status"` Total int `json:"total"` Regenerated int `json:"regenerated"` Skipped int `json:"skipped"` Errors int `json:"errors"` ReportsDir string `json:"reports_dir"` SnapshotType string `json:"snapshotType"` } // SnapshotRepairResponse describes the daily snapshot repair response. type SnapshotRepairResponse struct { Status string `json:"status"` Repaired string `json:"repaired"` Failed string `json:"failed"` } // SnapshotRepairSuiteResponse describes the full repair suite response. type SnapshotRepairSuiteResponse struct { Status string `json:"status"` DailyRepaired string `json:"daily_repaired"` DailyFailed string `json:"daily_failed"` MonthlyRefined string `json:"monthly_refined"` MonthlyFailed string `json:"monthly_failed"` } // VcenterCacheRebuildResult describes rebuild results for a single vCenter. type VcenterCacheRebuildResult struct { Vcenter string `json:"vcenter"` FolderEntries int `json:"folder_entries"` ResourcePoolEntries int `json:"resource_pool_entries"` HostEntries int `json:"host_entries"` DurationSeconds float64 `json:"duration_seconds"` Error string `json:"error,omitempty"` } // VcenterCacheRebuildResponse describes the vCenter object cache rebuild response. type VcenterCacheRebuildResponse struct { Status string `json:"status"` Total int `json:"total"` Succeeded int `json:"succeeded"` Failed int `json:"failed"` Results []VcenterCacheRebuildResult `json:"results"` }