Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-aaron committed Jan 10, 2025
2 parents 621fe13 + 4307a29 commit bf31705
Show file tree
Hide file tree
Showing 5 changed files with 665 additions and 46 deletions.
82 changes: 42 additions & 40 deletions godo.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,46 +54,47 @@ type Client struct {
ratemtx sync.Mutex

// Services used for communicating with the API
Account AccountService
Actions ActionsService
Apps AppsService
Balance BalanceService
BillingHistory BillingHistoryService
CDNs CDNService
Certificates CertificatesService
Databases DatabasesService
Domains DomainsService
Droplets DropletsService
DropletActions DropletActionsService
DropletAutoscale DropletAutoscaleService
Firewalls FirewallsService
FloatingIPs FloatingIPsService
FloatingIPActions FloatingIPActionsService
Functions FunctionsService
Images ImagesService
ImageActions ImageActionsService
Invoices InvoicesService
Keys KeysService
Kubernetes KubernetesService
LoadBalancers LoadBalancersService
Monitoring MonitoringService
OneClick OneClickService
Projects ProjectsService
Regions RegionsService
Registry RegistryService
Registries RegistriesService
ReservedIPs ReservedIPsService
ReservedIPV6s ReservedIPV6sService
ReservedIPActions ReservedIPActionsService
ReservedIPV6Actions ReservedIPV6ActionsService
Sizes SizesService
Snapshots SnapshotsService
SpacesKeys SpacesKeysService
Storage StorageService
StorageActions StorageActionsService
Tags TagsService
UptimeChecks UptimeChecksService
VPCs VPCsService
Account AccountService
Actions ActionsService
Apps AppsService
Balance BalanceService
BillingHistory BillingHistoryService
CDNs CDNService
Certificates CertificatesService
Databases DatabasesService
Domains DomainsService
Droplets DropletsService
DropletActions DropletActionsService
DropletAutoscale DropletAutoscaleService
Firewalls FirewallsService
FloatingIPs FloatingIPsService
FloatingIPActions FloatingIPActionsService
Functions FunctionsService
Images ImagesService
ImageActions ImageActionsService
Invoices InvoicesService
Keys KeysService
Kubernetes KubernetesService
LoadBalancers LoadBalancersService
Monitoring MonitoringService
OneClick OneClickService
Projects ProjectsService
Regions RegionsService
Registry RegistryService
Registries RegistriesService
ReservedIPs ReservedIPsService
ReservedIPV6s ReservedIPV6sService
ReservedIPActions ReservedIPActionsService
ReservedIPV6Actions ReservedIPV6ActionsService
Sizes SizesService
Snapshots SnapshotsService
SpacesKeys SpacesKeysService
Storage StorageService
StorageActions StorageActionsService
Tags TagsService
UptimeChecks UptimeChecksService
VPCs VPCsService
PartnerInterconnectAttachments PartnerInterconnectAttachmentsService

// Optional function called after every successful request made to the DO APIs
onRequestCompleted RequestCompletionCallback
Expand Down Expand Up @@ -309,6 +310,7 @@ func NewClient(httpClient *http.Client) *Client {
c.Tags = &TagsServiceOp{client: c}
c.UptimeChecks = &UptimeChecksServiceOp{client: c}
c.VPCs = &VPCsServiceOp{client: c}
c.PartnerInterconnectAttachments = &PartnerInterconnectAttachmentsServiceOp{client: c}

c.headers = make(map[string]string)

Expand Down
2 changes: 1 addition & 1 deletion kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ var (

// KubernetesMaintenanceToDay returns the appropriate KubernetesMaintenancePolicyDay for the given string.
func KubernetesMaintenanceToDay(day string) (KubernetesMaintenancePolicyDay, error) {
d, ok := toDay[day]
d, ok := toDay[strings.ToLower(day)]
if !ok {
return 0, fmt.Errorf("unknown day: %q", day)
}
Expand Down
10 changes: 5 additions & 5 deletions kubernetes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func TestKubernetesClusters_Get(t *testing.T) {
],
"maintenance_policy": {
"start_time": "00:00",
"day": "monday"
"day": "Monday"
},
"created_at": "2018-06-15T07:10:23Z",
"updated_at": "2018-06-15T07:11:26Z"
Expand Down Expand Up @@ -633,7 +633,7 @@ func TestKubernetesClusters_Create(t *testing.T) {
],
"maintenance_policy": {
"start_time": "00:00",
"day": "monday"
"day": "Monday"
},
"control_plane_firewall": {
"enabled": true,
Expand Down Expand Up @@ -743,7 +743,7 @@ func TestKubernetesClusters_Create_AutoScalePool(t *testing.T) {
],
"maintenance_policy": {
"start_time": "00:00",
"day": "monday"
"day": "Monday"
}
}
}`
Expand Down Expand Up @@ -851,7 +851,7 @@ func TestKubernetesClusters_Update(t *testing.T) {
],
"maintenance_policy": {
"start_time": "00:00",
"day": "monday"
"day": "Monday"
},
"control_plane_firewall": {
"enabled": true,
Expand Down Expand Up @@ -944,7 +944,7 @@ func TestKubernetesClusters_Update_FalseAutoUpgrade(t *testing.T) {
],
"maintenance_policy": {
"start_time": "00:00",
"day": "monday"
"day": "Monday"
}
}
}`
Expand Down
Loading

0 comments on commit bf31705

Please sign in to comment.