Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OCPDownloadRequest ¶
type OCPDownloadRequest struct {
Version string `json:"version"`
Artifacts []string `json:"artifacts"` // list of artifact names to download
}
OCPDownloadRequest is the request body for POST /api/ocp/download.
type OCPDownloadStatus ¶
type OCPDownloadStatus struct {
Name string `json:"name"`
Status string `json:"status"` // "pending", "downloading", "done", "error"
Error string `json:"error,omitempty"`
Path string `json:"path,omitempty"`
}
OCPDownloadStatus tracks the status of each artifact download.
type ProviderStatusJSON ¶
type ProviderStatusJSON struct {
Name string `json:"name"`
Enabled bool `json:"enabled"`
FileCount int `json:"file_count"`
TotalSize int64 `json:"total_size"`
LastSync time.Time `json:"last_sync"`
LastStatus string `json:"last_status"`
FailedFiles int `json:"failed_files"`
}
ProviderStatusJSON is the JSON representation of a provider status.
type RegistryPushRequest ¶
type RegistryPushRequest struct {
SourceProvider string `json:"source_provider"`
TargetProvider string `json:"target_provider"`
DryRun bool `json:"dry_run"`
}
RegistryPushRequest is the expected request body for POST /api/registry/push.
type ResolveFailuresRequest ¶
type ResolveFailuresRequest struct {
Provider string `json:"provider"`
IDs []int64 `json:"ids"`
All bool `json:"all"`
}
ResolveFailuresRequest is the expected request body for POST /api/sync/failures/resolve.
type RetryRequestBody ¶
type RetryRequestBody struct {
Provider string `json:"provider"`
}
RetryRequestBody is the expected request body for POST /api/sync/retry.
type ScanRequestBody ¶
type ScanRequestBody struct {
Provider string `json:"provider"`
}
ScanRequestBody is the expected request body for POST /api/scan.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the HTTP server for the airgap web UI.
func NewServer ¶
func NewServer( eng *engine.SyncManager, reg *provider.Registry, st *store.Store, cfg *config.Config, logger *slog.Logger, ) *Server
NewServer creates a new Server instance.
func (*Server) SetVersion ¶ added in v0.4.0
SetVersion sets the version string displayed in the UI.
type SyncRequestBody ¶
type SyncRequestBody struct {
Provider string `json:"provider"`
DryRun bool `json:"dry_run"`
Force bool `json:"force"`
MaxWorkers int `json:"max_workers"`
}
SyncRequestBody is the expected request body for POST /api/sync.
type SyncResponseBody ¶
type SyncResponseBody struct {
Provider string `json:"provider"`
Success bool `json:"success"`
Message string `json:"message"`
Downloaded int `json:"downloaded,omitempty"`
Deleted int `json:"deleted,omitempty"`
Skipped int `json:"skipped,omitempty"`
Failed int `json:"failed,omitempty"`
BytesTransferred int64 `json:"bytes_transferred,omitempty"`
StartTime time.Time `json:"start_time,omitempty"`
EndTime time.Time `json:"end_time,omitempty"`
}
SyncResponseBody is the response from POST /api/sync.
type ValidateRequestBody ¶
type ValidateRequestBody struct {
Provider string `json:"provider"`
}
ValidateRequestBody is the expected request body for POST /api/validate.