This commit is contained in:
jandre 2021-01-01 23:55:05 +01:00
parent 5ee2cf0d24
commit b4d92869f8

View File

@ -23,15 +23,30 @@ 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 string
type BackupState int
const (
New BackupState = "New"
Running BackupState = "Running"
Success BackupState = "Success"
Failure BackupState = "Failure"
Success BackupState = 3
New BackupState = 2
Running BackupState = 1
Failure BackupState = 0
)
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"`
}