Documentation ¶
Index ¶
- func APIDocsActionHandler() http.Handler
- func HealthActionHandler(w http.ResponseWriter, _ *http.Request)
- func MetricsActionHandler() http.Handler
- func ReadyActionHandler(w http.ResponseWriter, _ *http.Request)
- func RootActionHandler(w http.ResponseWriter, r *http.Request)
- func VersionActionHandler(w http.ResponseWriter, _ *http.Request)
- type Service
- func (s *Service) ApplyConfig(w http.ResponseWriter, _ *http.Request)
- func (s *Service) ConfigActionHandler(w http.ResponseWriter, r *http.Request)
- func (s *Service) ConfigClusterActionHandler(w http.ResponseWriter, r *http.Request)
- func (s *Service) ConfigPolicyActionHandler(w http.ResponseWriter, r *http.Request)
- func (s *Service) ConfigRoutineActionHandler(w http.ResponseWriter, r *http.Request)
- func (s *Service) ConfigStorageActionHandler(w http.ResponseWriter, r *http.Request)
- func (s *Service) GetAllFullBackups(w http.ResponseWriter, r *http.Request)
- func (s *Service) GetAllIncrementalBackups(w http.ResponseWriter, r *http.Request)
- func (s *Service) GetCurrentBackupInfo(w http.ResponseWriter, r *http.Request)
- func (s *Service) GetFullBackupsForRoutine(w http.ResponseWriter, r *http.Request)
- func (s *Service) GetIncrementalBackupsForRoutine(w http.ResponseWriter, r *http.Request)
- func (s *Service) ReadAerospikeClusters(w http.ResponseWriter, _ *http.Request)
- func (s *Service) ReadAllStorage(w http.ResponseWriter, _ *http.Request)
- func (s *Service) ReadPolicies(w http.ResponseWriter, _ *http.Request)
- func (s *Service) ReadRoutines(w http.ResponseWriter, _ *http.Request)
- func (s *Service) RestoreByTimeHandler(w http.ResponseWriter, r *http.Request)
- func (s *Service) RestoreFullHandler(w http.ResponseWriter, r *http.Request)
- func (s *Service) RestoreIncrementalHandler(w http.ResponseWriter, r *http.Request)
- func (s *Service) RestoreStatusHandler(w http.ResponseWriter, r *http.Request)
- func (s *Service) RetrieveConfig(w http.ResponseWriter, r *http.Request)
- func (s *Service) ScheduleFullBackup(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIDocsActionHandler ¶
APIDocsActionHandler @Summary OpenAPI specification endpoint. @Description Serves the API documentation in Swagger UI format. @ID api-docs @Tags System @Router /api-docs/ [get] @Produce html @Success 200 {string} string
func HealthActionHandler ¶
func HealthActionHandler(w http.ResponseWriter, _ *http.Request)
HealthActionHandler @Summary Health endpoint. @ID health @Tags System @Router /health [get] @Success 200
func MetricsActionHandler ¶
MetricsActionHandler @Summary Prometheus metrics endpoint. @ID metrics @Tags System @Router /metrics [get] @Success 200
func ReadyActionHandler ¶
func ReadyActionHandler(w http.ResponseWriter, _ *http.Request)
ReadyActionHandler @Summary Readiness endpoint. @ID ready @Tags System @Router /ready [get] @Success 200
func RootActionHandler ¶
func RootActionHandler(w http.ResponseWriter, r *http.Request)
RootActionHandler @Summary Root endpoint. @ID root @Tags System @Router / [get] @Success 200
func VersionActionHandler ¶
func VersionActionHandler(w http.ResponseWriter, _ *http.Request)
VersionActionHandler @Summary Returns application version. @ID version @Tags System @Router /version [get] @Success 200 {string} string "version"
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService( config *model.Config, scheduler quartz.Scheduler, restoreManager service.RestoreManager, backupBackends service.BackendsHolder, handlerHolder service.BackupHandlerHolder, configurationManager service.ConfigurationManager, clientManger service.ClientManager, logger *slog.Logger, ) *Service
func (*Service) ApplyConfig ¶
func (s *Service) ApplyConfig(w http.ResponseWriter, _ *http.Request)
ApplyConfig @Summary Applies the configuration for the service. @ID applyConfig @Tags Configuration @Router /v1/config/apply [post] @Accept json @Success 200 @Failure 400 {string} string
func (*Service) ConfigActionHandler ¶
func (s *Service) ConfigActionHandler(w http.ResponseWriter, r *http.Request)
func (*Service) ConfigClusterActionHandler ¶
func (s *Service) ConfigClusterActionHandler(w http.ResponseWriter, r *http.Request)
func (*Service) ConfigPolicyActionHandler ¶
func (s *Service) ConfigPolicyActionHandler(w http.ResponseWriter, r *http.Request)
func (*Service) ConfigRoutineActionHandler ¶
func (s *Service) ConfigRoutineActionHandler(w http.ResponseWriter, r *http.Request)
func (*Service) ConfigStorageActionHandler ¶
func (s *Service) ConfigStorageActionHandler(w http.ResponseWriter, r *http.Request)
func (*Service) GetAllFullBackups ¶
func (s *Service) GetAllFullBackups(w http.ResponseWriter, r *http.Request)
GetAllFullBackups @Summary Get available full backups. @ID getFullBackups @Tags Backup @Produce json @Param from query int false "Lower bound timestamp filter" format(int64) @Param to query int false "Upper bound timestamp filter" format(int64) @Router /v1/backups/full [get] @Success 200 {object} map[string][]model.BackupDetails "Full backups by routine" @Failure 400 {string} string @Failure 500 {string} string
func (*Service) GetAllIncrementalBackups ¶
func (s *Service) GetAllIncrementalBackups(w http.ResponseWriter, r *http.Request)
GetAllIncrementalBackups @Summary Get available incremental backups. @ID getIncrementalBackups @Tags Backup @Produce json @Param from query int false "Lower bound timestamp filter" format(int64) @Param to query int false "Upper bound timestamp filter" format(int64) @Router /v1/backups/incremental [get] @Success 200 {object} map[string][]model.BackupDetails "Incremental backups by routine" @Failure 400 {string} string @Failure 500 {string} string
func (*Service) GetCurrentBackupInfo ¶
func (s *Service) GetCurrentBackupInfo(w http.ResponseWriter, r *http.Request)
GetCurrentBackupInfo @Summary Get current backup statistics. @ID getCurrentBackup @Tags Backup @Produce json @Param name path string true "Backup routine name" @Router /v1/backups/currentBackup/{name} [get] @Success 200 {object} model.CurrentBackups "Current backup statistics" @Failure 404 {string} string @Failure 400 {string} string @Failure 500 {string} string
func (*Service) GetFullBackupsForRoutine ¶
func (s *Service) GetFullBackupsForRoutine(w http.ResponseWriter, r *http.Request)
GetFullBackupsForRoutine @Summary Get available full backups for routine. @ID GetFullBackupsForRoutine @Tags Backup @Produce json @Param name path string true "Backup routine name" @Param from query int false "Lower bound timestamp filter" format(int64) @Param to query int false "Upper bound timestamp filter" format(int64) @Router /v1/backups/full/{name} [get] @Success 200 {object} []model.BackupDetails "Full backups for routine" @Failure 400 {string} string @Failure 500 {string} string
func (*Service) GetIncrementalBackupsForRoutine ¶
func (s *Service) GetIncrementalBackupsForRoutine(w http.ResponseWriter, r *http.Request)
GetIncrementalBackupsForRoutine @Summary Get incremental backups for routine. @ID GetIncrementalBackupsForRoutine @Tags Backup @Produce json @Param name path string true "Backup routine name" @Param from query int false "Lower bound timestamp filter" format(int64) @Param to query int false "Upper bound timestamp filter" format(int64) @Router /v1/backups/incremental/{name} [get] @Success 200 {object} []model.BackupDetails "Incremental backups for routine" @Failure 400 {string} string @Failure 500 {string} string
func (*Service) ReadAerospikeClusters ¶
func (s *Service) ReadAerospikeClusters(w http.ResponseWriter, _ *http.Request)
ReadAerospikeClusters reads all Aerospike clusters from the configuration. @Summary Reads all Aerospike clusters from the configuration. @ID readAllClusters @Tags Configuration @Router /v1/config/clusters [get] @Produce json @Success 200 {object} map[string]model.AerospikeCluster @Failure 500 {string} string
func (*Service) ReadAllStorage ¶
func (s *Service) ReadAllStorage(w http.ResponseWriter, _ *http.Request)
ReadAllStorage reads all storage from the configuration. @Summary Reads all storage from the configuration. @ID ReadAllStorage @Tags Configuration @Router /v1/config/storage [get] @Produce json @Success 200 {object} map[string]model.Storage @Failure 500 {string} string
func (*Service) ReadPolicies ¶
func (s *Service) ReadPolicies(w http.ResponseWriter, _ *http.Request)
ReadPolicies reads all backup policies from the configuration. @Summary Reads all policies from the configuration. @ID ReadPolicies @Tags Configuration @Router /v1/config/policies [get] @Produce json @Success 200 {object} map[string]model.BackupPolicy @Failure 500 {string} string
func (*Service) ReadRoutines ¶
func (s *Service) ReadRoutines(w http.ResponseWriter, _ *http.Request)
ReadRoutines reads all backup routines from the configuration. @Summary Reads all routines from the configuration. @ID ReadRoutines @Tags Configuration @Router /v1/config/routines [get] @Produce json @Success 200 {object} map[string]model.BackupRoutine @Failure 400 {string} string
func (*Service) RestoreByTimeHandler ¶
func (s *Service) RestoreByTimeHandler(w http.ResponseWriter, r *http.Request)
RestoreByTimeHandler @Summary Trigger an asynchronous restore operation to specific point in time. @ID restoreTimestamp @Description Restores backup from the given point in time. @Tags Restore @Router /v1/restore/timestamp [post] @Accept json @Param request body model.RestoreTimestampRequest true "Restore request details" @Success 202 {int64} int64 "Restore operation job id" @Failure 400 {string} string @Failure 405 {string} string
func (*Service) RestoreFullHandler ¶
func (s *Service) RestoreFullHandler(w http.ResponseWriter, r *http.Request)
RestoreFullHandler @Summary Trigger an asynchronous full restore operation. @ID restoreFull @Tags Restore @Router /v1/restore/full [post] @Accept json @Param request body model.RestoreRequest true "Restore request details" @Success 202 {int64} int64 "Restore operation job id" @Failure 400 {string} string @Failure 405 {string} string
func (*Service) RestoreIncrementalHandler ¶
func (s *Service) RestoreIncrementalHandler(w http.ResponseWriter, r *http.Request)
RestoreIncrementalHandler @Summary Trigger an asynchronous incremental restore operation. @ID restoreIncremental @Tags Restore @Router /v1/restore/incremental [post] @Accept json @Param request body model.RestoreRequest true "Restore request details" @Success 202 {int64} int64 "Restore operation job id" @Failure 400 {string} string @Failure 405 {string} string
func (*Service) RestoreStatusHandler ¶
func (s *Service) RestoreStatusHandler(w http.ResponseWriter, r *http.Request)
RestoreStatusHandler @Summary Retrieve status for a restore job. @ID restoreStatus @Tags Restore @Produce json @Param jobId path int true "Job ID to retrieve the status" format(int64) @Router /v1/restore/status/{jobId} [get] @Success 200 {object} model.RestoreJobStatus "Restore job status details" @Failure 400 {string} string
func (*Service) RetrieveConfig ¶
func (s *Service) RetrieveConfig(w http.ResponseWriter, r *http.Request)
RetrieveConfig @Summary Retrieve Aerospike cluster configuration backup @ID retrieveConfiguration @Tags Restore @Produce application/zip @Param name path string true "Backup routine name" @Param timestamp path int true "Backup timestamp" format(int64) @Router /v1/retrieve/configuration/{name}/{timestamp} [get] @Success 200 {file} application/zip "configuration backup" @Failure 400 {string} string @Failure 405 {string} string
func (*Service) ScheduleFullBackup ¶
func (s *Service) ScheduleFullBackup(w http.ResponseWriter, r *http.Request)
ScheduleFullBackup @Summary Schedule a full backup once per routine name. @ID ScheduleFullBackup @Tags Backup @Param name path string true "Backup routine name" @Param delay query int false "Delay interval in milliseconds" @Router /v1/backups/schedule/{name} [post] @Success 202 @Failure 400 {string} string @Failure 404 {string} string @Failure 500 {string} string