Documentation ¶
Index ¶
- func Contains(collection []string, toFind string) bool
- func ErrToStatus(err error) int
- func ErrWrap(status int, err error, message string) error
- func ErrWrapf(status int, err error, format string, args ...interface{}) error
- func NewErr(status int, err error) error
- func TriggerInstallationBackup(store installationBackupStore, installation *model.Installation, env string, ...) (*model.InstallationBackup, error)
- func TriggerInstallationDBRestoration(store installationRestorationStore, installation *model.Installation, ...) (*model.InstallationDBRestorationOperation, error)
- func ValidateDBMigrationDestination(store dbMigrationValidationStore, destinationDB *model.MultitenantDatabase, ...) error
- type ErrWithStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrToStatus ¶
ErrToStatus tries to extract status code from error. If the error is not ErrWithStatus returns status 500.
func TriggerInstallationBackup ¶
func TriggerInstallationBackup(store installationBackupStore, installation *model.Installation, env string, logger log.FieldLogger) (*model.InstallationBackup, error)
TriggerInstallationBackup verifies that backup can be started for an Installation and triggers it.
func TriggerInstallationDBRestoration ¶
func TriggerInstallationDBRestoration(store installationRestorationStore, installation *model.Installation, backup *model.InstallationBackup, env string, logger log.FieldLogger) (*model.InstallationDBRestorationOperation, error)
TriggerInstallationDBRestoration validates, triggers and reports installation database restoration.
func ValidateDBMigrationDestination ¶
func ValidateDBMigrationDestination(store dbMigrationValidationStore, destinationDB *model.MultitenantDatabase, installationID string, maxWeight float64) error
ValidateDBMigrationDestination validates if installation can be migrated to destinationDB.
Types ¶
type ErrWithStatus ¶
type ErrWithStatus struct {
// contains filtered or unexported fields
}
ErrWithStatus represents error with status code. It can be hidden behind standard error interface and wrapped with errors.Wrap.
Click to show internal directories.
Click to hide internal directories.