-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathcommon.go
45 lines (39 loc) · 969 Bytes
/
common.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
package store
// RowStatus is the type of the row status
type RowStatus string
const (
// RowStatusNormal is the normal status of a row
RowStatusNormal RowStatus = "NORMAL"
// RowStatusArchived is the archived status of a row
RowStatusArchived RowStatus = "ARCHIVED"
)
func (r RowStatus) String() string {
switch r {
case RowStatusNormal:
return "NORMAL"
case RowStatusArchived:
return "ARCHIVED"
}
return ""
}
// CloudProvider is the type of the cloud provider, eg. GCP, Aliyun
type CloudProvider string
const (
// CloudProviderAWS is the enumerate type for AWS
CloudProviderAWS = "AWS"
// CloudProviderALIYUN is the enumerate type for ALIYUN
CloudProviderALIYUN = "ALIYUN"
// CloudProviderGCP is the enumerate type for GCP
CloudProviderGCP = "GCP"
)
func (c CloudProvider) String() string {
switch c {
case CloudProviderAWS:
return "AWS"
case CloudProviderALIYUN:
return "ALIYUN"
case CloudProviderGCP:
return "GCP"
}
return ""
}