From 94a7c0263006542f8faa22d924f444cfa8471fb7 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 24 May 2026 09:16:13 +0000 Subject: [PATCH] fix(deps): update module github.com/hetznercloud/hcloud-go/v2 to v2.41.2 --- go.mod | 2 +- go.sum | 2 + .../hcloud-go/v2/hcloud/certificate.go | 10 ++--- .../hcloud-go/v2/hcloud/client.go | 14 +++++-- .../v2/hcloud/client_handler_http.go | 2 +- .../hetznercloud/hcloud-go/v2/hcloud/error.go | 4 +- .../hcloud-go/v2/hcloud/generate.go | 3 ++ .../hcloud-go/v2/hcloud/generate.sh | 37 +++++++++++++++++++ .../hcloud-go/v2/hcloud/hcloud.go | 2 +- .../hcloud-go/v2/hcloud/helper.go | 8 ++++ .../hcloud-go/v2/hcloud/interface_gen.go | 25 ------------- .../hcloud-go/v2/hcloud/labels.go | 2 +- .../hcloud-go/v2/hcloud/network.go | 6 +-- .../hcloud-go/v2/hcloud/pricing.go | 2 +- .../hcloud-go/v2/hcloud/primary_ip.go | 6 +++ .../hetznercloud/hcloud-go/v2/hcloud/rdns.go | 4 +- .../hcloud-go/v2/hcloud/schema/doc.go | 4 +- .../hcloud-go/v2/hcloud/schema/id_or_name.go | 4 +- .../v2/hcloud/schema/load_balancer.go | 2 +- .../hcloud-go/v2/hcloud/schema/primary_ip.go | 6 +-- .../hcloud-go/v2/hcloud/schema/server.go | 2 +- .../hcloud-go/v2/hcloud/schema/storage_box.go | 2 +- .../hcloud-go/v2/hcloud/schema_gen.go | 13 +++---- .../v2/hcloud/storage_box_subaccount.go | 4 +- .../v2/hcloud/zz_storage_box_client_iface.go | 2 +- vendor/modules.txt | 2 +- 26 files changed, 100 insertions(+), 70 deletions(-) create mode 100644 vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/generate.go create mode 100644 vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/generate.sh delete mode 100644 vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/interface_gen.go diff --git a/go.mod b/go.mod index 75e389d1..58c05dc1 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/google/uuid v1.6.0 github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 github.com/hashicorp/go-multierror v1.1.1 - github.com/hetznercloud/hcloud-go/v2 v2.40.0 + github.com/hetznercloud/hcloud-go/v2 v2.41.2 github.com/jackc/pgx/v5 v5.9.2 github.com/johannesboyne/gofakes3 v0.0.0-20260208201424-4c385a1f6a73 github.com/lestrrat-go/jwx/v4 v4.0.2 diff --git a/go.sum b/go.sum index 6a3c11b1..1bc57d5b 100644 --- a/go.sum +++ b/go.sum @@ -212,6 +212,8 @@ github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hetznercloud/hcloud-go/v2 v2.40.0 h1:fuP7khfiDQAIXdKyQq7f3LnnOjyZg0PXTafXjUKkqIA= github.com/hetznercloud/hcloud-go/v2 v2.40.0/go.mod h1:ANz38eerXjPv00dm9dckKhttOGtYeeGmjjvwL5e6c5E= +github.com/hetznercloud/hcloud-go/v2 v2.41.2 h1:fO5zsMgp5oejrtnFj8mYuqlp+iMuirpaKv4b5FYNRdQ= +github.com/hetznercloud/hcloud-go/v2 v2.41.2/go.mod h1:9OGvC//jbHE4sv2Oyo0bQ2vEWuUMKYoNMyj9Qxz2qcc= github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/certificate.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/certificate.go index c115285d..e2476c51 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/certificate.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/certificate.go @@ -26,13 +26,9 @@ type CertificateStatusType string // Possible certificate status. const ( - CertificateStatusTypePending CertificateStatusType = "pending" - CertificateStatusTypeFailed CertificateStatusType = "failed" - - // only in issuance. - CertificateStatusTypeCompleted CertificateStatusType = "completed" - - // only in renewal. + CertificateStatusTypePending CertificateStatusType = "pending" + CertificateStatusTypeFailed CertificateStatusType = "failed" + CertificateStatusTypeCompleted CertificateStatusType = "completed" CertificateStatusTypeScheduled CertificateStatusType = "scheduled" CertificateStatusTypeUnavailable CertificateStatusType = "unavailable" ) diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/client.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/client.go index 46c2c983..6aca929a 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/client.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/client.go @@ -23,7 +23,7 @@ import ( // Endpoint is the base URL of the Cloud API. const Endpoint = "https://api.hetzner.cloud/v1" -// Endpoint is the base URL of the Hetzner API. +// HetznerEndpoint is the base URL of the Hetzner API. const HetznerEndpoint = "https://api.hetzner.com/v1" // UserAgent is the value for the library part of the User-Agent header @@ -166,6 +166,8 @@ func WithToken(token string) ClientOption { // hcloud.WithPollOpts(hcloud.PollOpts{ // BackoffFunc: hcloud.ConstantBackoff(2 * time.Second), // }) +// +//go:fix inline func WithPollInterval(pollInterval time.Duration) ClientOption { return WithPollOpts(PollOpts{ BackoffFunc: ConstantBackoff(pollInterval), @@ -176,6 +178,8 @@ func WithPollInterval(pollInterval time.Duration) ClientOption { // function when polling from the API. // // Deprecated: WithPollBackoffFunc is deprecated, use [WithPollOpts] instead. +// +//go:fix inline func WithPollBackoffFunc(f BackoffFunc) ClientOption { return WithPollOpts(PollOpts{ BackoffFunc: f, @@ -202,10 +206,12 @@ func WithPollOpts(opts PollOpts) ClientOption { // The backoff function is used for retrying HTTP requests. // // Deprecated: WithBackoffFunc is deprecated, use [WithRetryOpts] instead. +// +//go:fix inline func WithBackoffFunc(f BackoffFunc) ClientOption { - return func(client *Client) { - client.retryBackoffFunc = f - } + return WithRetryOpts(RetryOpts{ + BackoffFunc: f, + }) } // RetryOpts defines the options used by [WithRetryOpts]. diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/client_handler_http.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/client_handler_http.go index c0a02fe3..0deb4257 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/client_handler_http.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/client_handler_http.go @@ -12,7 +12,7 @@ type httpHandler struct { httpClient *http.Client } -func (h *httpHandler) Do(req *http.Request, _ interface{}) (*Response, error) { +func (h *httpHandler) Do(req *http.Request, _ any) (*Response, error) { httpResponse, err := h.httpClient.Do(req) //nolint: bodyclose resp := &Response{Response: httpResponse} if err != nil { diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/error.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/error.go index 5db34634..a34fbd9a 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/error.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/error.go @@ -106,6 +106,8 @@ const ( // before Hetzner Cloud launched into the public. To make clients using the // old error code still work as expected, we set the value of the old error // code to that of the new error code. + // + //go:fix inline ErrorCodeLimitReached = ErrorCodeRateLimitExceeded ) @@ -113,7 +115,7 @@ const ( type Error struct { Code ErrorCode Message string - Details interface{} + Details any response *Response } diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/generate.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/generate.go new file mode 100644 index 00000000..d2214983 --- /dev/null +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/generate.go @@ -0,0 +1,3 @@ +package hcloud + +//go:generate ./generate.sh diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/generate.sh b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/generate.sh new file mode 100644 index 00000000..cad0ad27 --- /dev/null +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/generate.sh @@ -0,0 +1,37 @@ +#!/usr/bin/sh + +set -eu + +tool() { + ( + set -eux + go run -modfile=../tools/go.mod "$@" + ) +} + +tool github.com/vburenin/ifacemaker -f action.go -f action_watch.go -f action_waiter.go -s ActionClient -i IActionClient -p hcloud -o zz_action_client_iface.go +tool github.com/vburenin/ifacemaker -f action.go -s ResourceActionClient -i IResourceActionClient -p hcloud -o zz_resource_action_client_iface.go +tool github.com/vburenin/ifacemaker -f datacenter.go -s DatacenterClient -i IDatacenterClient -p hcloud -o zz_datacenter_client_iface.go +tool github.com/vburenin/ifacemaker -f floating_ip.go -s FloatingIPClient -i IFloatingIPClient -p hcloud -o zz_floating_ip_client_iface.go +tool github.com/vburenin/ifacemaker -f image.go -s ImageClient -i IImageClient -p hcloud -o zz_image_client_iface.go +tool github.com/vburenin/ifacemaker -f iso.go -s ISOClient -i IISOClient -p hcloud -o zz_iso_client_iface.go +tool github.com/vburenin/ifacemaker -f location.go -s LocationClient -i ILocationClient -p hcloud -o zz_location_client_iface.go +tool github.com/vburenin/ifacemaker -f network.go -s NetworkClient -i INetworkClient -p hcloud -o zz_network_client_iface.go +tool github.com/vburenin/ifacemaker -f pricing.go -s PricingClient -i IPricingClient -p hcloud -o zz_pricing_client_iface.go +tool github.com/vburenin/ifacemaker -f server.go -s ServerClient -i IServerClient -p hcloud -o zz_server_client_iface.go +tool github.com/vburenin/ifacemaker -f server_type.go -s ServerTypeClient -i IServerTypeClient -p hcloud -o zz_server_type_client_iface.go +tool github.com/vburenin/ifacemaker -f ssh_key.go -s SSHKeyClient -i ISSHKeyClient -p hcloud -o zz_ssh_key_client_iface.go +tool github.com/vburenin/ifacemaker -f volume.go -s VolumeClient -i IVolumeClient -p hcloud -o zz_volume_client_iface.go +tool github.com/vburenin/ifacemaker -f load_balancer.go -s LoadBalancerClient -i ILoadBalancerClient -p hcloud -o zz_load_balancer_client_iface.go +tool github.com/vburenin/ifacemaker -f load_balancer_type.go -s LoadBalancerTypeClient -i ILoadBalancerTypeClient -p hcloud -o zz_load_balancer_type_client_iface.go +tool github.com/vburenin/ifacemaker -f certificate.go -s CertificateClient -i ICertificateClient -p hcloud -o zz_certificate_client_iface.go +tool github.com/vburenin/ifacemaker -f firewall.go -s FirewallClient -i IFirewallClient -p hcloud -o zz_firewall_client_iface.go +tool github.com/vburenin/ifacemaker -f placement_group.go -s PlacementGroupClient -i IPlacementGroupClient -p hcloud -o zz_placement_group_client_iface.go +tool github.com/vburenin/ifacemaker -f rdns.go -s RDNSClient -i IRDNSClient -p hcloud -o zz_rdns_client_iface.go +tool github.com/vburenin/ifacemaker -f primary_ip.go -s PrimaryIPClient -i IPrimaryIPClient -p hcloud -o zz_primary_ip_client_iface.go +tool github.com/vburenin/ifacemaker -f zone.go -f zone_rrset.go -s ZoneClient -i IZoneClient -p hcloud -o zz_zone_client_iface.go +tool github.com/vburenin/ifacemaker -f storage_box_type.go -s StorageBoxTypeClient -i IStorageBoxTypeClient -p hcloud -o zz_storage_box_type_client_iface.go +tool github.com/vburenin/ifacemaker -f storage_box.go -f storage_box_snapshot.go -f storage_box_subaccount.go -s StorageBoxClient -i IStorageBoxClient -p hcloud -o zz_storage_box_client_iface.go + +tool github.com/hexdigest/gowrap/cmd/gowrap gen -g -p . -i converter -t schema.tmpl -o zz_schema.go +tool github.com/jmattheis/goverter/cmd/goverter gen ./... diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/hcloud.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/hcloud.go index 1128d9af..63fb6483 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/hcloud.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/hcloud.go @@ -80,4 +80,4 @@ breaking changes. package hcloud // Version is the library's version following Semantic Versioning. -const Version = "2.40.0" // x-releaser-pleaser-version +const Version = "2.41.2" // x-releaser-pleaser-version diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/helper.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/helper.go index 1965609a..2d761ab2 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/helper.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/helper.go @@ -10,19 +10,27 @@ func Ptr[T any](p T) *T { // String returns a pointer to the passed string s. // // Deprecated: Use [Ptr] instead. +// +//go:fix inline func String(s string) *string { return Ptr(s) } // Int returns a pointer to the passed integer i. // // Deprecated: Use [Ptr] instead. +// +//go:fix inline func Int(i int) *int { return Ptr(i) } // Bool returns a pointer to the passed bool b. // // Deprecated: Use [Ptr] instead. +// +//go:fix inline func Bool(b bool) *bool { return Ptr(b) } // Duration returns a pointer to the passed time.Duration d. // // Deprecated: Use [Ptr] instead. +// +//go:fix inline func Duration(d time.Duration) *time.Duration { return Ptr(d) } diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/interface_gen.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/interface_gen.go deleted file mode 100644 index edb53614..00000000 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/interface_gen.go +++ /dev/null @@ -1,25 +0,0 @@ -package hcloud - -//go:generate go run github.com/vburenin/ifacemaker -f action.go -f action_watch.go -f action_waiter.go -s ActionClient -i IActionClient -p hcloud -o zz_action_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f action.go -s ResourceActionClient -i IResourceActionClient -p hcloud -o zz_resource_action_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f datacenter.go -s DatacenterClient -i IDatacenterClient -p hcloud -o zz_datacenter_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f floating_ip.go -s FloatingIPClient -i IFloatingIPClient -p hcloud -o zz_floating_ip_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f image.go -s ImageClient -i IImageClient -p hcloud -o zz_image_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f iso.go -s ISOClient -i IISOClient -p hcloud -o zz_iso_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f location.go -s LocationClient -i ILocationClient -p hcloud -o zz_location_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f network.go -s NetworkClient -i INetworkClient -p hcloud -o zz_network_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f pricing.go -s PricingClient -i IPricingClient -p hcloud -o zz_pricing_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f server.go -s ServerClient -i IServerClient -p hcloud -o zz_server_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f server_type.go -s ServerTypeClient -i IServerTypeClient -p hcloud -o zz_server_type_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f ssh_key.go -s SSHKeyClient -i ISSHKeyClient -p hcloud -o zz_ssh_key_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f volume.go -s VolumeClient -i IVolumeClient -p hcloud -o zz_volume_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f load_balancer.go -s LoadBalancerClient -i ILoadBalancerClient -p hcloud -o zz_load_balancer_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f load_balancer_type.go -s LoadBalancerTypeClient -i ILoadBalancerTypeClient -p hcloud -o zz_load_balancer_type_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f certificate.go -s CertificateClient -i ICertificateClient -p hcloud -o zz_certificate_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f firewall.go -s FirewallClient -i IFirewallClient -p hcloud -o zz_firewall_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f placement_group.go -s PlacementGroupClient -i IPlacementGroupClient -p hcloud -o zz_placement_group_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f rdns.go -s RDNSClient -i IRDNSClient -p hcloud -o zz_rdns_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f primary_ip.go -s PrimaryIPClient -i IPrimaryIPClient -p hcloud -o zz_primary_ip_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f zone.go -f zone_rrset.go -s ZoneClient -i IZoneClient -p hcloud -o zz_zone_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f storage_box_type.go -s StorageBoxTypeClient -i IStorageBoxTypeClient -p hcloud -o zz_storage_box_type_client_iface.go -//go:generate go run github.com/vburenin/ifacemaker -f storage_box.go -f storage_box_snapshot.go -f storage_box_subaccount.go -s StorageBoxClient -i IStorageBoxClient -p hcloud -o zz_storage_box_client_iface.go diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/labels.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/labels.go index 3dc7d781..ba2cfb87 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/labels.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/labels.go @@ -9,7 +9,7 @@ var keyRegexp = regexp.MustCompile( `^([a-z0-9A-Z]((?:[\-_.]|[a-z0-9A-Z]){0,253}[a-z0-9A-Z])?/)?[a-z0-9A-Z]((?:[\-_.]|[a-z0-9A-Z]|){0,61}[a-z0-9A-Z])?$`) var valueRegexp = regexp.MustCompile(`^(([a-z0-9A-Z](?:[\-_.]|[a-z0-9A-Z]){0,61})?[a-z0-9A-Z]$|$)`) -func ValidateResourceLabels(labels map[string]interface{}) (bool, error) { +func ValidateResourceLabels(labels map[string]any) (bool, error) { for k, v := range labels { if match := keyRegexp.MatchString(k); !match { return false, fmt.Errorf("label key '%s' is not correctly formatted", k) diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/network.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/network.go index 0bf409e2..b502ac1e 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/network.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/network.go @@ -28,13 +28,13 @@ type NetworkSubnetType string // List of available network subnet types. const ( - // Used to connect cloud servers and load balancers. + // NetworkSubnetTypeCloud is used to connect cloud servers and load balancers. NetworkSubnetTypeCloud NetworkSubnetType = "cloud" - // Used to connect cloud servers and load balancers. + // NetworkSubnetTypeServer is used to connect cloud servers and load balancers. // // Deprecated: Use [NetworkSubnetTypeCloud] instead. NetworkSubnetTypeServer NetworkSubnetType = "server" - // Used to connect cloud servers and load balancers with dedicated servers. + // NetworkSubnetTypeVSwitch is used to connect cloud servers and load balancers with dedicated servers. // // See https://docs.hetzner.com/networking/networks/connect-dedi-vswitch/ NetworkSubnetTypeVSwitch NetworkSubnetType = "vswitch" diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/pricing.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/pricing.go index 4e17e573..b9210e93 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/pricing.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/pricing.go @@ -69,7 +69,7 @@ type PrimaryIPTypePricing struct { Monthly PrimaryIPPrice } -// PrimaryIPTypePricing provides pricing information for PrimaryIPs. +// PrimaryIPPricing provides pricing information for PrimaryIPs. type PrimaryIPPricing struct { Type string Pricings []PrimaryIPTypePricing diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/primary_ip.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/primary_ip.go index 19eb8bc5..87d07310 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/primary_ip.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/primary_ip.go @@ -136,6 +136,8 @@ type PrimaryIPAssignOpts struct { } // Deprecated: Please use [schema.PrimaryIPActionAssignResponse] instead. +// +//go:fix inline type PrimaryIPAssignResult = schema.PrimaryIPActionAssignResponse // PrimaryIPChangeDNSPtrOpts defines the request to @@ -147,6 +149,8 @@ type PrimaryIPChangeDNSPtrOpts struct { } // Deprecated: Please use [schema.PrimaryIPChangeDNSPtrResponse] instead. +// +//go:fix inline type PrimaryIPChangeDNSPtrResult = schema.PrimaryIPActionChangeDNSPtrResponse // PrimaryIPChangeProtectionOpts defines the request to @@ -157,6 +161,8 @@ type PrimaryIPChangeProtectionOpts struct { } // Deprecated: Please use [schema.PrimaryIPActionChangeProtectionResponse] instead. +// +//go:fix inline type PrimaryIPChangeProtectionResult = schema.PrimaryIPActionChangeProtectionResponse // PrimaryIPClient is a client for the Primary IP API. diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/rdns.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/rdns.go index f53c030d..fe8e5546 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/rdns.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/rdns.go @@ -29,14 +29,14 @@ func (c *RDNSClient) ChangeDNSPtr(ctx context.Context, rdns RDNSSupporter, ip ne } // SupportsRDNS checks if the object supports reverse dns functions. -func SupportsRDNS(i interface{}) bool { +func SupportsRDNS(i any) bool { _, ok := i.(RDNSSupporter) return ok } // RDNSLookup searches for the dns assigned to the given IP address. // It returns an error if the object does not support reverse dns or if there is no dns set for the given IP address. -func RDNSLookup(i interface{}, ip net.IP) (string, error) { +func RDNSLookup(i any, ip net.IP) (string, error) { rdns, ok := i.(RDNSSupporter) if !ok { return "", fmt.Errorf("%+v does not support RDNS", i) diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/doc.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/doc.go index 057aef05..57ffdb69 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/doc.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/doc.go @@ -1,4 +1,4 @@ -// The schema package holds API schemas for the `hcloud-go` library. - +// Package schema holds API schemas for the `hcloud-go` library. +// // Breaking changes may occur without notice. Do not use in production! package schema diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/id_or_name.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/id_or_name.go index 75e1169b..cbd883f4 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/id_or_name.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/id_or_name.go @@ -53,14 +53,14 @@ func (o *IDOrName) UnmarshalJSON(data []byte) error { if err != nil { return &json.UnmarshalTypeError{ Value: string(data), - Type: reflect.TypeOf(*o), + Type: reflect.TypeFor[IDOrName](), } } o.ID = id default: return &json.UnmarshalTypeError{ Value: string(data), - Type: reflect.TypeOf(*o), + Type: reflect.TypeFor[IDOrName](), } } diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/load_balancer.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/load_balancer.go index 59f39c6c..fde918f3 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/load_balancer.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/load_balancer.go @@ -406,7 +406,7 @@ type LoadBalancerGetMetricsResponse struct { // LoadBalancerTimeSeriesVals contains the values for a Load Balancer time // series. type LoadBalancerTimeSeriesVals struct { - Values []interface{} `json:"values"` + Values []any `json:"values"` } // LoadBalancerActionChangeDNSPtrRequest defines the schema for the request to diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/primary_ip.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/primary_ip.go index d974a746..3b91bd0b 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/primary_ip.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/primary_ip.go @@ -36,8 +36,7 @@ type PrimaryIPDNSPTR struct { IP string `json:"ip"` } -// PrimaryIPCreateOpts defines the request to -// create a Primary IP. +// PrimaryIPCreateRequest defines the request to create a Primary IP. type PrimaryIPCreateRequest struct { Name string `json:"name"` Type string `json:"type"` @@ -70,8 +69,7 @@ type PrimaryIPListResponse struct { PrimaryIPs []PrimaryIP `json:"primary_ips"` } -// PrimaryIPUpdateOpts defines the request to -// update a Primary IP. +// PrimaryIPUpdateRequest defines the request to update a Primary IP. type PrimaryIPUpdateRequest struct { Name string `json:"name,omitempty"` Labels *map[string]string `json:"labels,omitempty"` diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/server.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/server.go index f80345da..450d10e9 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/server.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/server.go @@ -419,7 +419,7 @@ type ServerGetMetricsResponse struct { // ServerTimeSeriesVals contains the values for a Server time series. type ServerTimeSeriesVals struct { - Values []interface{} `json:"values"` + Values []any `json:"values"` } // ServerActionAddToPlacementGroupRequest defines the schema for the request to diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/storage_box.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/storage_box.go index 274f177b..68e10a96 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/storage_box.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema/storage_box.go @@ -116,7 +116,7 @@ type StorageBoxChangeTypeRequest struct { StorageBoxType IDOrName `json:"storage_box_type"` } -// StorageBoxChangeTypeResponse defines the schema of the response when changing the type of a Storage Box. +// StorageBoxResetPasswordRequest defines the schema of the request to reset the password of a Storage Box. type StorageBoxResetPasswordRequest struct { Password string `json:"password"` } diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema_gen.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema_gen.go index 5e5e5b5d..f8e497a9 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema_gen.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/schema_gen.go @@ -9,9 +9,6 @@ import ( "github.com/hetznercloud/hcloud-go/v2/hcloud/schema" ) -//go:generate go run github.com/hexdigest/gowrap/cmd/gowrap gen -g -p . -i converter -t schema.tmpl -o zz_schema.go -//go:generate go run github.com/jmattheis/goverter/cmd/goverter gen ./... - /* This file generates conversions methods between the schema and the hcloud package. Goverter (https://github.com/jmattheis/goverter) is used to generate these conversion @@ -717,7 +714,7 @@ func intSecondsFromDuration(d time.Duration) int { return int(d.Seconds()) } -func errorDetailsFromSchema(d interface{}) interface{} { +func errorDetailsFromSchema(d any) any { switch typed := d.(type) { case schema.ErrorDetailsInvalidInput: details := ErrorDetailsInvalidInput{ @@ -739,7 +736,7 @@ func errorDetailsFromSchema(d interface{}) interface{} { return nil } -func schemaFromErrorDetails(d interface{}) interface{} { +func schemaFromErrorDetails(d any) any { switch typed := d.(type) { case ErrorDetailsInvalidInput: details := schema.ErrorDetailsInvalidInput{ @@ -933,7 +930,7 @@ func serverMetricsTimeSeriesFromSchema(s schema.ServerTimeSeriesVals) ([]ServerM for i, rawVal := range s.Values { var val ServerMetricsValue - tup, ok := rawVal.([]interface{}) + tup, ok := rawVal.([]any) if !ok { return nil, fmt.Errorf("failed to convert value to tuple: %v", rawVal) } @@ -963,7 +960,7 @@ func loadBalancerMetricsTimeSeriesFromSchema(s schema.LoadBalancerTimeSeriesVals for i, rawVal := range s.Values { var val LoadBalancerMetricsValue - tup, ok := rawVal.([]interface{}) + tup, ok := rawVal.([]any) if !ok { return nil, fmt.Errorf("failed to convert value to tuple: %v", rawVal) } @@ -1044,7 +1041,7 @@ func stringMapToStringMapPtr(m map[string]string) *map[string]string { return &m } -func rawSchemaFromErrorDetails(v interface{}) json.RawMessage { +func rawSchemaFromErrorDetails(v any) json.RawMessage { d := schemaFromErrorDetails(v) if v == nil { return nil diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/storage_box_subaccount.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/storage_box_subaccount.go index 00aa9e1b..a6010ff8 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/storage_box_subaccount.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/storage_box_subaccount.go @@ -191,7 +191,7 @@ type StorageBoxSubaccountCreateOpts struct { Labels map[string]string } -// StorageBoxSubaccountAccessSettingsOpts represents the options for [StorageBoxSubaccountAccessSettings] of a [StorageBoxSubaccount]. +// StorageBoxSubaccountCreateOptsAccessSettings represents the options for [StorageBoxSubaccountCreateOpts.AccessSettings]. type StorageBoxSubaccountCreateOptsAccessSettings struct { ReachableExternally *bool Readonly *bool @@ -353,7 +353,7 @@ type StorageBoxSubaccountChangeHomeDirectoryOpts struct { HomeDirectory string } -// UpdateSubaccountAccessSettings changes the home directory of a [StorageBoxSubaccount]. +// ChangeSubaccountHomeDirectory changes the home directory of a [StorageBoxSubaccount]. // // See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccount-actions-change-home-directory func (c *StorageBoxClient) ChangeSubaccountHomeDirectory( diff --git a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/zz_storage_box_client_iface.go b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/zz_storage_box_client_iface.go index 0148d08e..4ee4f145 100644 --- a/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/zz_storage_box_client_iface.go +++ b/vendor/github.com/hetznercloud/hcloud-go/v2/hcloud/zz_storage_box_client_iface.go @@ -175,7 +175,7 @@ type IStorageBoxClient interface { // // See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccount-actions-update-access-settings UpdateSubaccountAccessSettings(ctx context.Context, subaccount *StorageBoxSubaccount, opts StorageBoxSubaccountUpdateAccessSettingsOpts) (*Action, *Response, error) - // UpdateSubaccountAccessSettings changes the home directory of a [StorageBoxSubaccount]. + // ChangeSubaccountHomeDirectory changes the home directory of a [StorageBoxSubaccount]. // // See https://docs.hetzner.cloud/reference/hetzner#storage-box-subaccount-actions-change-home-directory ChangeSubaccountHomeDirectory(ctx context.Context, subaccount *StorageBoxSubaccount, opts StorageBoxSubaccountChangeHomeDirectoryOpts) (*Action, *Response, error) diff --git a/vendor/modules.txt b/vendor/modules.txt index a8c50b9f..96c6818a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -444,7 +444,7 @@ github.com/hashicorp/errwrap # github.com/hashicorp/go-multierror v1.1.1 ## explicit; go 1.13 github.com/hashicorp/go-multierror -# github.com/hetznercloud/hcloud-go/v2 v2.40.0 +# github.com/hetznercloud/hcloud-go/v2 v2.41.2 ## explicit; go 1.25.0 github.com/hetznercloud/hcloud-go/v2/hcloud github.com/hetznercloud/hcloud-go/v2/hcloud/exp/ctxutil