From a1b0b3675236ec71ecfd62980dc7013e430fed03 Mon Sep 17 00:00:00 2001 From: Jean-Marc Andre Date: Sat, 2 Jan 2021 00:39:28 +0100 Subject: [PATCH] Revert "Try int" This reverts commit b4d92869f84a81fcb84a79177cfd8da7e1ff58c1. --- api/v1alpha1/backupsession_types.go | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/api/v1alpha1/backupsession_types.go b/api/v1alpha1/backupsession_types.go index b67fb89..7ca9d8e 100644 --- a/api/v1alpha1/backupsession_types.go +++ b/api/v1alpha1/backupsession_types.go @@ -23,30 +23,15 @@ import ( // EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN! // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. -type BackupState int +type BackupState string const ( - Success BackupState = 3 - New BackupState = 2 - Running BackupState = 1 - Failure BackupState = 0 + New BackupState = "New" + Running BackupState = "Running" + Success BackupState = "Success" + Failure BackupState = "Failure" ) -func (b *BackupState) String() string { - var state string - switch *b { - case Failure: - state = "Failure" - case Running: - state = "Running" - case New: - state = "New" - case Success: - state = "Success" - } - return state -} - type Ref struct { Name string `json:"name"` }