@@ -9,19 +9,54 @@ import (
9
9
"github.com/go-resty/resty/v2"
10
10
)
11
11
12
+ // This is an enumeration of Capabilities Linode offers that can be referenced
13
+ // through the user-facing parts of the application.
14
+ // Defined as strings rather than a custom type to avoid breaking change.
15
+ // Can be changed in the potential v2 version.
16
+ const (
17
+ Linodes string = "Linodes"
18
+ NodeBalancers string = "NodeBalancers"
19
+ BlockStorage string = "Block Storage"
20
+ ObjectStorage string = "Object Storage"
21
+ ObjectStorageRegions string = "Object Storage Access Key Regions"
22
+ LKE string = "Kubernetes"
23
+ LkeHaControlPlanes string = "LKE HA Control Planes"
24
+ CloudFirewall string = "Cloud Firewall"
25
+ GPU string = "GPU Linodes"
26
+ Vlans string = "Vlans"
27
+ VPCs string = "VPCs"
28
+ VPCsExtra string = "VPCs Extra"
29
+ MachineImages string = "Machine Images"
30
+ BareMetal string = "Bare Metal"
31
+ DBAAS string = "Managed Databases"
32
+ BlockStorageMigrations string = "Block Storage Migrations"
33
+ Metadata string = "Metadata"
34
+ PremiumPlans string = "Premium Plans"
35
+ EdgePlans string = "Edge Plans"
36
+ LKEControlPlaneACL string = "LKE Network Access Control List (IP ACL)"
37
+ ACLB string = "Akamai Cloud Load Balancer"
38
+ SupportTicketSeverity string = "Support Ticket Severity"
39
+ Backups string = "Backups"
40
+ PlacementGroup string = "Placement Group"
41
+ DiskEncryption string = "Disk Encryption"
42
+ )
43
+
12
44
// Region-related endpoints have a custom expiry time as the
13
45
// `status` field may update for database outages.
14
46
var cacheExpiryTime = time .Minute
15
47
16
48
// Region represents a linode region object
17
49
type Region struct {
18
- ID string `json:"id"`
19
- Country string `json:"country"`
20
- Capabilities []string `json:"capabilities"`
21
- Status string `json:"status"`
22
- Resolvers RegionResolvers `json:"resolvers"`
23
- Label string `json:"label"`
24
- SiteType string `json:"site_type"`
50
+ ID string `json:"id"`
51
+ Country string `json:"country"`
52
+
53
+ // A List of enums from the above constants
54
+ Capabilities []string `json:"capabilities"`
55
+
56
+ Status string `json:"status"`
57
+ Resolvers RegionResolvers `json:"resolvers"`
58
+ Label string `json:"label"`
59
+ SiteType string `json:"site_type"`
25
60
}
26
61
27
62
// RegionResolvers contains the DNS resolvers of a region
0 commit comments