Files
vctp2/server/models/api_responses.go
Nathan Coad ceadf42048
All checks were successful
continuous-integration/drone/push Build is passing
update godoc
2026-01-22 12:52:28 +11:00

62 lines
2.0 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"`
}