-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbackupinstance.go
49 lines (38 loc) · 1.47 KB
/
backupinstance.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package v1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// MySQLBackupInstance represents an already created backup.
type MySQLBackupInstance struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata"`
Spec MySQLBackupInstanceSpec `json:"spec"`
Status MySQLBackupInstanceStatus `json:"status,omitempty"`
}
// MySQLBackupInstanceStatus represents a backup instance status.
type MySQLBackupInstanceStatus struct {
Phase MySQLBackupInstanceStatusPhase `json:"phase"`
}
// MySQLBackupInstanceStatusPhase represents a backup instance phase.
type MySQLBackupInstanceStatusPhase string
// Available MySQLBackupInstanceStatusPhase phases.
const (
MySQLBackupScheduled MySQLBackupInstanceStatusPhase = "Scheduled"
MySQLBackupStarted MySQLBackupInstanceStatusPhase = "Started"
MySQLBackupFailed MySQLBackupInstanceStatusPhase = "Failed"
MySQLBackupCompleted MySQLBackupInstanceStatusPhase = "Completed"
)
// MySQLBackupInstanceSpec stores the properties of a backup.
type MySQLBackupInstanceSpec struct {
Schedule string `json:"schedule"`
Cluster string `json:"cluster"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// MySQLBackupInstanceList represents a list of MySQLBackupInstances.
type MySQLBackupInstanceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []MySQLBackupInstance `json:"items"`
}