All checks were successful
continuous-integration/drone/push Build is passing
81 lines
2.8 KiB
Go
81 lines
2.8 KiB
Go
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"`
|
|
}
|
|
|
|
// 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"`
|
|
}
|