parent
938f4348ee
commit
a1b0b36752
@ -23,30 +23,15 @@ import (
|
|||||||
// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
|
// 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.
|
// 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 (
|
const (
|
||||||
Success BackupState = 3
|
New BackupState = "New"
|
||||||
New BackupState = 2
|
Running BackupState = "Running"
|
||||||
Running BackupState = 1
|
Success BackupState = "Success"
|
||||||
Failure BackupState = 0
|
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 {
|
type Ref struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user