diff --git a/go.mod b/go.mod index d4f7c200..cd7afdd6 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,6 @@ require ( github.com/guptarohit/asciigraph v0.5.6 github.com/hetznercloud/hcloud-go/v2 v2.5.0 github.com/pelletier/go-toml/v2 v2.1.1 - github.com/rjeczalik/interfaces v0.3.0 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 diff --git a/go.sum b/go.sum index 8dbb63ce..1b42bf46 100644 --- a/go.sum +++ b/go.sum @@ -70,8 +70,6 @@ github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwa github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rjeczalik/interfaces v0.3.0 h1:BM+eRAwfOcvW5qVhxv7x09x/0jwHN6z2GB9HsSA2weM= -github.com/rjeczalik/interfaces v0.3.0/go.mod h1:wfGcwiM/PXv9l6U/CPCb4Yh5KngED3dR3OppEVHMWuU= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= diff --git a/internal/hcapi2/certificate.go b/internal/hcapi2/certificate.go index a8105f7d..29d41fa5 100644 --- a/internal/hcapi2/certificate.go +++ b/internal/hcapi2/certificate.go @@ -3,24 +3,26 @@ package hcapi2 import ( "context" "strconv" + + "github.com/hetznercloud/hcloud-go/v2/hcloud" ) // CertificateClient embeds the Hetzner Cloud Certificate client and provides some // additional helper functions. type CertificateClient interface { - CertificateClientBase + hcloud.ICertificateClient Names() []string LabelKeys(string) []string } -func NewCertificateClient(client CertificateClientBase) CertificateClient { +func NewCertificateClient(client hcloud.ICertificateClient) CertificateClient { return &certificateClient{ - CertificateClientBase: client, + ICertificateClient: client, } } type certificateClient struct { - CertificateClientBase + hcloud.ICertificateClient } // Names obtains a list of available data centers. It returns nil if diff --git a/internal/hcapi2/datacenter.go b/internal/hcapi2/datacenter.go index 92e16959..a9880460 100644 --- a/internal/hcapi2/datacenter.go +++ b/internal/hcapi2/datacenter.go @@ -3,23 +3,25 @@ package hcapi2 import ( "context" "strconv" + + "github.com/hetznercloud/hcloud-go/v2/hcloud" ) // DatacenterClient embeds the Hetzner Cloud DataCenter client and provides some // additional helper functions. type DatacenterClient interface { - DatacenterClientBase + hcloud.IDatacenterClient Names() []string } -func NewDatacenterClient(client DatacenterClientBase) DatacenterClient { +func NewDatacenterClient(client hcloud.IDatacenterClient) DatacenterClient { return &datacenterClient{ - DatacenterClientBase: client, + IDatacenterClient: client, } } type datacenterClient struct { - DatacenterClientBase + hcloud.IDatacenterClient } // Names obtains a list of available data centers. It returns nil if diff --git a/internal/hcapi2/firewall.go b/internal/hcapi2/firewall.go index 0dd841d5..d9dd9ae9 100644 --- a/internal/hcapi2/firewall.go +++ b/internal/hcapi2/firewall.go @@ -3,24 +3,26 @@ package hcapi2 import ( "context" "strconv" + + "github.com/hetznercloud/hcloud-go/v2/hcloud" ) type FirewallClient interface { - FirewallClientBase + hcloud.IFirewallClient Names() []string LabelKeys(string) []string } -func NewFirewallClient(client FirewallClientBase) FirewallClient { +func NewFirewallClient(client hcloud.IFirewallClient) FirewallClient { return &firewallClient{ - FirewallClientBase: client, + IFirewallClient: client, } } // FirewallClient embeds the Hetzner Cloud Firewall client and provides // some additional helper functions. type firewallClient struct { - FirewallClientBase + hcloud.IFirewallClient } // Names obtains a list of available firewalls. It returns nil if diff --git a/internal/hcapi2/floatingip.go b/internal/hcapi2/floatingip.go index b23ba805..ff8a4eb9 100644 --- a/internal/hcapi2/floatingip.go +++ b/internal/hcapi2/floatingip.go @@ -3,27 +3,29 @@ package hcapi2 import ( "context" "strconv" + + "github.com/hetznercloud/hcloud-go/v2/hcloud" ) // FloatingIPClient embeds the hcloud FloatingIPClient (via an interface) and provides // some additional helper functions. type FloatingIPClient interface { - FloatingIPClientBase + hcloud.IFloatingIPClient Names() []string LabelKeys(idOrName string) []string } // NewFloatingIPClient creates a new floating IP client. -func NewFloatingIPClient(client FloatingIPClientBase) FloatingIPClient { +func NewFloatingIPClient(client hcloud.IFloatingIPClient) FloatingIPClient { return &floatingIPClient{ - FloatingIPClientBase: client, + IFloatingIPClient: client, } } // FloatingIPClient embeds the Hetzner Cloud FloatingIP client and provides some // additional helper functions. type floatingIPClient struct { - FloatingIPClientBase + hcloud.IFloatingIPClient } // Names obtains a list of available floating IPs. It returns nil if diff --git a/internal/hcapi2/image.go b/internal/hcapi2/image.go index c2a2ffad..b668e870 100644 --- a/internal/hcapi2/image.go +++ b/internal/hcapi2/image.go @@ -10,19 +10,19 @@ import ( // ImageClient embeds the Hetzner Cloud Image client and provides some // additional helper functions. type ImageClient interface { - ImageClientBase + hcloud.IImageClient Names() []string LabelKeys(string) []string } -func NewImageClient(client ImageClientBase) ImageClient { +func NewImageClient(client hcloud.IImageClient) ImageClient { return &imageClient{ - ImageClientBase: client, + IImageClient: client, } } type imageClient struct { - ImageClientBase + hcloud.IImageClient } // Names obtains a list of available images. It returns nil if image names diff --git a/internal/hcapi2/interface_gen.go b/internal/hcapi2/interface_gen.go deleted file mode 100644 index c99bdb23..00000000 --- a/internal/hcapi2/interface_gen.go +++ /dev/null @@ -1,19 +0,0 @@ -package hcapi2 - -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.CertificateClient -as hcapi2.CertificateClientBase -o zz_certificate_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.DatacenterClient -as hcapi2.DatacenterClientBase -o zz_datacenter_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.ImageClient -as hcapi2.ImageClientBase -o zz_image_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.ISOClient -as hcapi2.ISOClientBase -o zz_iso_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.FirewallClient -as hcapi2.FirewallClientBase -o zz_firewall_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.FloatingIPClient -as hcapi2.FloatingIPClientBase -o zz_floating_ip_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.LocationClient -as hcapi2.LocationClientBase -o zz_location_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.LoadBalancerClient -as hcapi2.LoadBalancerClientBase -o zz_loadbalancer_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.LoadBalancerTypeClient -as hcapi2.LoadBalancerTypeClientBase -o zz_loadbalancer_type_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.NetworkClient -as hcapi2.NetworkClientBase -o zz_network_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.ServerClient -as hcapi2.ServerClientBase -o zz_server_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.ServerTypeClient -as hcapi2.ServerTypeClientBase -o zz_server_type_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.SSHKeyClient -as hcapi2.SSHKeyClientBase -o zz_ssh_key_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.VolumeClient -as hcapi2.VolumeClientBase -o zz_volume_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.PlacementGroupClient -as hcapi2.PlacementGroupClientBase -o zz_placement_group_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.RDNSClient -as hcapi2.RDNSClientBase -o zz_rdns_client_base.go -//go:generate interfacer -for github.com/hetznercloud/hcloud-go/v2/hcloud.PrimaryIPClient -as hcapi2.PrimaryIPClientBase -o zz_primary_ip_client_base.go diff --git a/internal/hcapi2/iso.go b/internal/hcapi2/iso.go index 7e7dce93..bed7f282 100644 --- a/internal/hcapi2/iso.go +++ b/internal/hcapi2/iso.go @@ -3,23 +3,25 @@ package hcapi2 import ( "context" "strconv" + + "github.com/hetznercloud/hcloud-go/v2/hcloud" ) // ISOClient embeds the Hetzner Cloud iso client and provides some // additional helper functions. type ISOClient interface { - ISOClientBase + hcloud.IISOClient Names() []string } -func NewISOClient(client ISOClientBase) ISOClient { +func NewISOClient(client hcloud.IISOClient) ISOClient { return &isoClient{ - ISOClientBase: client, + IISOClient: client, } } type isoClient struct { - ISOClientBase + hcloud.IISOClient } // Names obtains a list of available data centers. It returns nil if diff --git a/internal/hcapi2/load_balancer_type.go b/internal/hcapi2/load_balancer_type.go index ccfee621..67946e12 100644 --- a/internal/hcapi2/load_balancer_type.go +++ b/internal/hcapi2/load_balancer_type.go @@ -9,20 +9,20 @@ import ( ) type LoadBalancerTypeClient interface { - LoadBalancerTypeClientBase + hcloud.ILoadBalancerTypeClient Names() []string LoadBalancerTypeName(id int64) string LoadBalancerTypeDescription(id int64) string } -func NewLoadBalancerTypeClient(client LoadBalancerTypeClientBase) LoadBalancerTypeClient { +func NewLoadBalancerTypeClient(client hcloud.ILoadBalancerTypeClient) LoadBalancerTypeClient { return &loadBalancerTypeClient{ - LoadBalancerTypeClientBase: client, + ILoadBalancerTypeClient: client, } } type loadBalancerTypeClient struct { - LoadBalancerTypeClientBase + hcloud.ILoadBalancerTypeClient lbTypeByID map[int64]*hcloud.LoadBalancerType once sync.Once diff --git a/internal/hcapi2/loadbalancer.go b/internal/hcapi2/loadbalancer.go index 9c540584..2aff0526 100644 --- a/internal/hcapi2/loadbalancer.go +++ b/internal/hcapi2/loadbalancer.go @@ -11,20 +11,20 @@ import ( // LoadBalancerClient embeds the Hetzner Cloud LoadBalancer client and provides some // additional helper functions. type LoadBalancerClient interface { - LoadBalancerClientBase + hcloud.ILoadBalancerClient LoadBalancerName(id int64) string Names() []string LabelKeys(string) []string } -func NewLoadBalancerClient(client LoadBalancerClientBase) LoadBalancerClient { +func NewLoadBalancerClient(client hcloud.ILoadBalancerClient) LoadBalancerClient { return &loadBalancerClient{ - LoadBalancerClientBase: client, + ILoadBalancerClient: client, } } type loadBalancerClient struct { - LoadBalancerClientBase + hcloud.ILoadBalancerClient lbByID map[int64]*hcloud.LoadBalancer diff --git a/internal/hcapi2/location.go b/internal/hcapi2/location.go index 40d9aa15..fffebe65 100644 --- a/internal/hcapi2/location.go +++ b/internal/hcapi2/location.go @@ -3,24 +3,26 @@ package hcapi2 import ( "context" "strconv" + + "github.com/hetznercloud/hcloud-go/v2/hcloud" ) // LocationClient embeds the Hetzner Cloud Location client and provides some // additional helper functions. type LocationClient interface { - LocationClientBase + hcloud.ILocationClient Names() []string NetworkZones() []string } -func NewLocationClient(client LocationClientBase) LocationClient { +func NewLocationClient(client hcloud.ILocationClient) LocationClient { return &locationClient{ - LocationClientBase: client, + ILocationClient: client, } } type locationClient struct { - LocationClientBase + hcloud.ILocationClient } // Names obtains a list of available locations. It returns nil if diff --git a/internal/hcapi2/network.go b/internal/hcapi2/network.go index 395f8fcd..e9668ad9 100644 --- a/internal/hcapi2/network.go +++ b/internal/hcapi2/network.go @@ -11,20 +11,20 @@ import ( // NetworkClient embeds the Hetzner Cloud Network client and provides some // additional helper functions. type NetworkClient interface { - NetworkClientBase + hcloud.INetworkClient Names() []string Name(int64) string LabelKeys(string) []string } -func NewNetworkClient(client NetworkClientBase) NetworkClient { +func NewNetworkClient(client hcloud.INetworkClient) NetworkClient { return &networkClient{ - NetworkClientBase: client, + INetworkClient: client, } } type networkClient struct { - NetworkClientBase + hcloud.INetworkClient netsByID map[int64]*hcloud.Network netsByName map[string]*hcloud.Network diff --git a/internal/hcapi2/placement_group.go b/internal/hcapi2/placement_group.go index 9a088b86..12502217 100644 --- a/internal/hcapi2/placement_group.go +++ b/internal/hcapi2/placement_group.go @@ -3,22 +3,24 @@ package hcapi2 import ( "context" "strconv" + + "github.com/hetznercloud/hcloud-go/v2/hcloud" ) type PlacementGroupClient interface { - PlacementGroupClientBase + hcloud.IPlacementGroupClient Names() []string LabelKeys(string) []string } -func NewPlacementGroupClient(client PlacementGroupClientBase) PlacementGroupClient { +func NewPlacementGroupClient(client hcloud.IPlacementGroupClient) PlacementGroupClient { return &placementGroupClient{ - PlacementGroupClientBase: client, + IPlacementGroupClient: client, } } type placementGroupClient struct { - PlacementGroupClientBase + hcloud.IPlacementGroupClient } func (c *placementGroupClient) Names() []string { diff --git a/internal/hcapi2/primaryip.go b/internal/hcapi2/primaryip.go index 51a23e6e..18b687b4 100644 --- a/internal/hcapi2/primaryip.go +++ b/internal/hcapi2/primaryip.go @@ -10,7 +10,7 @@ import ( // PrimaryIPClient embeds the hcloud PrimaryIPClient (via an interface) and provides // some additional helper functions. type PrimaryIPClient interface { - PrimaryIPClientBase + hcloud.IPrimaryIPClient Names() []string IPv4Names() []string IPv6Names() []string @@ -18,16 +18,16 @@ type PrimaryIPClient interface { } // NewPrimaryIPClient creates a new primary IP client. -func NewPrimaryIPClient(client PrimaryIPClientBase) PrimaryIPClient { +func NewPrimaryIPClient(client hcloud.IPrimaryIPClient) PrimaryIPClient { return &primaryIPClient{ - PrimaryIPClientBase: client, + IPrimaryIPClient: client, } } // PrimaryIPClient embeds the Hetzner Cloud PrimaryIP client and provides some // additional helper functions. type primaryIPClient struct { - PrimaryIPClientBase + hcloud.IPrimaryIPClient } // Names obtains a list of available primary IPs. It returns nil if diff --git a/internal/hcapi2/rdns.go b/internal/hcapi2/rdns.go index cb96d61c..cb948c84 100644 --- a/internal/hcapi2/rdns.go +++ b/internal/hcapi2/rdns.go @@ -1,16 +1,18 @@ package hcapi2 +import "github.com/hetznercloud/hcloud-go/v2/hcloud" + // NewRDNSClient embeds the Hetzner Cloud rdns client. type RDNSClient interface { - RDNSClientBase + hcloud.IRDNSClient } -func NewRDNSClient(client RDNSClientBase) RDNSClient { +func NewRDNSClient(client hcloud.IRDNSClient) RDNSClient { return &rdnsClient{ - RDNSClientBase: client, + IRDNSClient: client, } } type rdnsClient struct { - RDNSClientBase + hcloud.IRDNSClient } diff --git a/internal/hcapi2/server.go b/internal/hcapi2/server.go index 69a1d63b..862e424a 100644 --- a/internal/hcapi2/server.go +++ b/internal/hcapi2/server.go @@ -9,7 +9,7 @@ import ( ) type ServerClient interface { - ServerClientBase + hcloud.IServerClient ServerName(id int64) string Names() []string LabelKeys(idOrName string) []string @@ -17,14 +17,14 @@ type ServerClient interface { func NewServerClient(client *hcloud.ServerClient) ServerClient { return &serverClient{ - ServerClientBase: client, + IServerClient: client, } } // ServerClient embeds the Hetzner Cloud Server client and provides some // additional helper functions. type serverClient struct { - ServerClientBase + hcloud.IServerClient ServerTypes *hcloud.ServerTypeClient diff --git a/internal/hcapi2/server_type.go b/internal/hcapi2/server_type.go index 0932a5ac..7e1718ba 100644 --- a/internal/hcapi2/server_type.go +++ b/internal/hcapi2/server_type.go @@ -9,20 +9,20 @@ import ( ) type ServerTypeClient interface { - ServerTypeClientBase + hcloud.IServerTypeClient Names() []string ServerTypeName(id int64) string ServerTypeDescription(id int64) string } -func NewServerTypeClient(client ServerTypeClientBase) ServerTypeClient { +func NewServerTypeClient(client hcloud.IServerTypeClient) ServerTypeClient { return &serverTypeClient{ - ServerTypeClientBase: client, + IServerTypeClient: client, } } type serverTypeClient struct { - ServerTypeClientBase + hcloud.IServerTypeClient srvTypeByID map[int64]*hcloud.ServerType once sync.Once diff --git a/internal/hcapi2/sshkey.go b/internal/hcapi2/sshkey.go index d3a8d28f..e3fd1dc4 100644 --- a/internal/hcapi2/sshkey.go +++ b/internal/hcapi2/sshkey.go @@ -3,24 +3,26 @@ package hcapi2 import ( "context" "strconv" + + "github.com/hetznercloud/hcloud-go/v2/hcloud" ) // SSHKeyClient embeds the Hetzner Cloud SSHKey client and provides some // additional helper functions. type SSHKeyClient interface { - SSHKeyClientBase + hcloud.ISSHKeyClient Names() []string LabelKeys(idOrName string) []string } -func NewSSHKeyClient(client SSHKeyClientBase) SSHKeyClient { +func NewSSHKeyClient(client hcloud.ISSHKeyClient) SSHKeyClient { return &sshKeyClient{ - SSHKeyClientBase: client, + ISSHKeyClient: client, } } type sshKeyClient struct { - SSHKeyClientBase + hcloud.ISSHKeyClient } // Names obtains a list of available SSH keys. It returns nil if SSH key diff --git a/internal/hcapi2/volume.go b/internal/hcapi2/volume.go index 3706fcf5..50cee43d 100644 --- a/internal/hcapi2/volume.go +++ b/internal/hcapi2/volume.go @@ -3,24 +3,26 @@ package hcapi2 import ( "context" "strconv" + + "github.com/hetznercloud/hcloud-go/v2/hcloud" ) // VolumeClient embeds the Hetzner Cloud Volume client and provides some additional // helper functions. type VolumeClient interface { - VolumeClientBase + hcloud.IVolumeClient Names() []string LabelKeys(idOrName string) []string } -func NewVolumeClient(client VolumeClientBase) VolumeClient { +func NewVolumeClient(client hcloud.IVolumeClient) VolumeClient { return &volumeClient{ - VolumeClientBase: client, + IVolumeClient: client, } } type volumeClient struct { - VolumeClientBase + hcloud.IVolumeClient } // Names obtains a list of available volumes for the current account. It diff --git a/internal/hcapi2/zz_certificate_client_base.go b/internal/hcapi2/zz_certificate_client_base.go deleted file mode 100644 index 3f3be456..00000000 --- a/internal/hcapi2/zz_certificate_client_base.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// CertificateClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.CertificateClient". -type CertificateClientBase interface { - All(context.Context) ([]*hcloud.Certificate, error) - AllWithOpts(context.Context, hcloud.CertificateListOpts) ([]*hcloud.Certificate, error) - Create(context.Context, hcloud.CertificateCreateOpts) (*hcloud.Certificate, *hcloud.Response, error) - CreateCertificate(context.Context, hcloud.CertificateCreateOpts) (hcloud.CertificateCreateResult, *hcloud.Response, error) - Delete(context.Context, *hcloud.Certificate) (*hcloud.Response, error) - Get(context.Context, string) (*hcloud.Certificate, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.Certificate, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.Certificate, *hcloud.Response, error) - List(context.Context, hcloud.CertificateListOpts) ([]*hcloud.Certificate, *hcloud.Response, error) - RetryIssuance(context.Context, *hcloud.Certificate) (*hcloud.Action, *hcloud.Response, error) - Update(context.Context, *hcloud.Certificate, hcloud.CertificateUpdateOpts) (*hcloud.Certificate, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_datacenter_client_base.go b/internal/hcapi2/zz_datacenter_client_base.go deleted file mode 100644 index 07042ab9..00000000 --- a/internal/hcapi2/zz_datacenter_client_base.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// DatacenterClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.DatacenterClient". -type DatacenterClientBase interface { - All(context.Context) ([]*hcloud.Datacenter, error) - AllWithOpts(context.Context, hcloud.DatacenterListOpts) ([]*hcloud.Datacenter, error) - Get(context.Context, string) (*hcloud.Datacenter, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.Datacenter, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.Datacenter, *hcloud.Response, error) - List(context.Context, hcloud.DatacenterListOpts) ([]*hcloud.Datacenter, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_firewall_client_base.go b/internal/hcapi2/zz_firewall_client_base.go deleted file mode 100644 index bde1a007..00000000 --- a/internal/hcapi2/zz_firewall_client_base.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// FirewallClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.FirewallClient". -type FirewallClientBase interface { - All(context.Context) ([]*hcloud.Firewall, error) - AllWithOpts(context.Context, hcloud.FirewallListOpts) ([]*hcloud.Firewall, error) - ApplyResources(context.Context, *hcloud.Firewall, []hcloud.FirewallResource) ([]*hcloud.Action, *hcloud.Response, error) - Create(context.Context, hcloud.FirewallCreateOpts) (hcloud.FirewallCreateResult, *hcloud.Response, error) - Delete(context.Context, *hcloud.Firewall) (*hcloud.Response, error) - Get(context.Context, string) (*hcloud.Firewall, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.Firewall, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.Firewall, *hcloud.Response, error) - List(context.Context, hcloud.FirewallListOpts) ([]*hcloud.Firewall, *hcloud.Response, error) - RemoveResources(context.Context, *hcloud.Firewall, []hcloud.FirewallResource) ([]*hcloud.Action, *hcloud.Response, error) - SetRules(context.Context, *hcloud.Firewall, hcloud.FirewallSetRulesOpts) ([]*hcloud.Action, *hcloud.Response, error) - Update(context.Context, *hcloud.Firewall, hcloud.FirewallUpdateOpts) (*hcloud.Firewall, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_floating_ip_client_base.go b/internal/hcapi2/zz_floating_ip_client_base.go deleted file mode 100644 index ffe62742..00000000 --- a/internal/hcapi2/zz_floating_ip_client_base.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// FloatingIPClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.FloatingIPClient". -type FloatingIPClientBase interface { - All(context.Context) ([]*hcloud.FloatingIP, error) - AllWithOpts(context.Context, hcloud.FloatingIPListOpts) ([]*hcloud.FloatingIP, error) - Assign(context.Context, *hcloud.FloatingIP, *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) - ChangeDNSPtr(context.Context, *hcloud.FloatingIP, string, *string) (*hcloud.Action, *hcloud.Response, error) - ChangeProtection(context.Context, *hcloud.FloatingIP, hcloud.FloatingIPChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) - Create(context.Context, hcloud.FloatingIPCreateOpts) (hcloud.FloatingIPCreateResult, *hcloud.Response, error) - Delete(context.Context, *hcloud.FloatingIP) (*hcloud.Response, error) - Get(context.Context, string) (*hcloud.FloatingIP, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.FloatingIP, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.FloatingIP, *hcloud.Response, error) - List(context.Context, hcloud.FloatingIPListOpts) ([]*hcloud.FloatingIP, *hcloud.Response, error) - Unassign(context.Context, *hcloud.FloatingIP) (*hcloud.Action, *hcloud.Response, error) - Update(context.Context, *hcloud.FloatingIP, hcloud.FloatingIPUpdateOpts) (*hcloud.FloatingIP, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_image_client_base.go b/internal/hcapi2/zz_image_client_base.go deleted file mode 100644 index f60f1951..00000000 --- a/internal/hcapi2/zz_image_client_base.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// ImageClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.ImageClient". -type ImageClientBase interface { - All(context.Context) ([]*hcloud.Image, error) - AllWithOpts(context.Context, hcloud.ImageListOpts) ([]*hcloud.Image, error) - ChangeProtection(context.Context, *hcloud.Image, hcloud.ImageChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) - Delete(context.Context, *hcloud.Image) (*hcloud.Response, error) - Get(context.Context, string) (*hcloud.Image, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.Image, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.Image, *hcloud.Response, error) - GetByNameAndArchitecture(context.Context, string, hcloud.Architecture) (*hcloud.Image, *hcloud.Response, error) - GetForArchitecture(context.Context, string, hcloud.Architecture) (*hcloud.Image, *hcloud.Response, error) - List(context.Context, hcloud.ImageListOpts) ([]*hcloud.Image, *hcloud.Response, error) - Update(context.Context, *hcloud.Image, hcloud.ImageUpdateOpts) (*hcloud.Image, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_iso_client_base.go b/internal/hcapi2/zz_iso_client_base.go deleted file mode 100644 index 2fed5783..00000000 --- a/internal/hcapi2/zz_iso_client_base.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// ISOClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.ISOClient". -type ISOClientBase interface { - All(context.Context) ([]*hcloud.ISO, error) - AllWithOpts(context.Context, hcloud.ISOListOpts) ([]*hcloud.ISO, error) - Get(context.Context, string) (*hcloud.ISO, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.ISO, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.ISO, *hcloud.Response, error) - List(context.Context, hcloud.ISOListOpts) ([]*hcloud.ISO, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_loadbalancer_client_base.go b/internal/hcapi2/zz_loadbalancer_client_base.go deleted file mode 100644 index 48147a0f..00000000 --- a/internal/hcapi2/zz_loadbalancer_client_base.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" - "net" -) - -// LoadBalancerClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.LoadBalancerClient". -type LoadBalancerClientBase interface { - AddIPTarget(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerAddIPTargetOpts) (*hcloud.Action, *hcloud.Response, error) - AddLabelSelectorTarget(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerAddLabelSelectorTargetOpts) (*hcloud.Action, *hcloud.Response, error) - AddServerTarget(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerAddServerTargetOpts) (*hcloud.Action, *hcloud.Response, error) - AddService(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerAddServiceOpts) (*hcloud.Action, *hcloud.Response, error) - All(context.Context) ([]*hcloud.LoadBalancer, error) - AllWithOpts(context.Context, hcloud.LoadBalancerListOpts) ([]*hcloud.LoadBalancer, error) - AttachToNetwork(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerAttachToNetworkOpts) (*hcloud.Action, *hcloud.Response, error) - ChangeAlgorithm(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerChangeAlgorithmOpts) (*hcloud.Action, *hcloud.Response, error) - ChangeDNSPtr(context.Context, *hcloud.LoadBalancer, string, *string) (*hcloud.Action, *hcloud.Response, error) - ChangeProtection(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) - ChangeType(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerChangeTypeOpts) (*hcloud.Action, *hcloud.Response, error) - Create(context.Context, hcloud.LoadBalancerCreateOpts) (hcloud.LoadBalancerCreateResult, *hcloud.Response, error) - Delete(context.Context, *hcloud.LoadBalancer) (*hcloud.Response, error) - DeleteService(context.Context, *hcloud.LoadBalancer, int) (*hcloud.Action, *hcloud.Response, error) - DetachFromNetwork(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerDetachFromNetworkOpts) (*hcloud.Action, *hcloud.Response, error) - DisablePublicInterface(context.Context, *hcloud.LoadBalancer) (*hcloud.Action, *hcloud.Response, error) - EnablePublicInterface(context.Context, *hcloud.LoadBalancer) (*hcloud.Action, *hcloud.Response, error) - Get(context.Context, string) (*hcloud.LoadBalancer, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.LoadBalancer, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.LoadBalancer, *hcloud.Response, error) - GetMetrics(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerGetMetricsOpts) (*hcloud.LoadBalancerMetrics, *hcloud.Response, error) - List(context.Context, hcloud.LoadBalancerListOpts) ([]*hcloud.LoadBalancer, *hcloud.Response, error) - RemoveIPTarget(context.Context, *hcloud.LoadBalancer, net.IP) (*hcloud.Action, *hcloud.Response, error) - RemoveLabelSelectorTarget(context.Context, *hcloud.LoadBalancer, string) (*hcloud.Action, *hcloud.Response, error) - RemoveServerTarget(context.Context, *hcloud.LoadBalancer, *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) - Update(context.Context, *hcloud.LoadBalancer, hcloud.LoadBalancerUpdateOpts) (*hcloud.LoadBalancer, *hcloud.Response, error) - UpdateService(context.Context, *hcloud.LoadBalancer, int, hcloud.LoadBalancerUpdateServiceOpts) (*hcloud.Action, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_loadbalancer_type_client_base.go b/internal/hcapi2/zz_loadbalancer_type_client_base.go deleted file mode 100644 index 4df96d98..00000000 --- a/internal/hcapi2/zz_loadbalancer_type_client_base.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// LoadBalancerTypeClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.LoadBalancerTypeClient". -type LoadBalancerTypeClientBase interface { - All(context.Context) ([]*hcloud.LoadBalancerType, error) - AllWithOpts(context.Context, hcloud.LoadBalancerTypeListOpts) ([]*hcloud.LoadBalancerType, error) - Get(context.Context, string) (*hcloud.LoadBalancerType, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.LoadBalancerType, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.LoadBalancerType, *hcloud.Response, error) - List(context.Context, hcloud.LoadBalancerTypeListOpts) ([]*hcloud.LoadBalancerType, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_location_client_base.go b/internal/hcapi2/zz_location_client_base.go deleted file mode 100644 index 31b2ca5c..00000000 --- a/internal/hcapi2/zz_location_client_base.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// LocationClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.LocationClient". -type LocationClientBase interface { - All(context.Context) ([]*hcloud.Location, error) - AllWithOpts(context.Context, hcloud.LocationListOpts) ([]*hcloud.Location, error) - Get(context.Context, string) (*hcloud.Location, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.Location, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.Location, *hcloud.Response, error) - List(context.Context, hcloud.LocationListOpts) ([]*hcloud.Location, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_network_client_base.go b/internal/hcapi2/zz_network_client_base.go deleted file mode 100644 index a83e73d4..00000000 --- a/internal/hcapi2/zz_network_client_base.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// NetworkClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.NetworkClient". -type NetworkClientBase interface { - AddRoute(context.Context, *hcloud.Network, hcloud.NetworkAddRouteOpts) (*hcloud.Action, *hcloud.Response, error) - AddSubnet(context.Context, *hcloud.Network, hcloud.NetworkAddSubnetOpts) (*hcloud.Action, *hcloud.Response, error) - All(context.Context) ([]*hcloud.Network, error) - AllWithOpts(context.Context, hcloud.NetworkListOpts) ([]*hcloud.Network, error) - ChangeIPRange(context.Context, *hcloud.Network, hcloud.NetworkChangeIPRangeOpts) (*hcloud.Action, *hcloud.Response, error) - ChangeProtection(context.Context, *hcloud.Network, hcloud.NetworkChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) - Create(context.Context, hcloud.NetworkCreateOpts) (*hcloud.Network, *hcloud.Response, error) - Delete(context.Context, *hcloud.Network) (*hcloud.Response, error) - DeleteRoute(context.Context, *hcloud.Network, hcloud.NetworkDeleteRouteOpts) (*hcloud.Action, *hcloud.Response, error) - DeleteSubnet(context.Context, *hcloud.Network, hcloud.NetworkDeleteSubnetOpts) (*hcloud.Action, *hcloud.Response, error) - Get(context.Context, string) (*hcloud.Network, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.Network, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.Network, *hcloud.Response, error) - List(context.Context, hcloud.NetworkListOpts) ([]*hcloud.Network, *hcloud.Response, error) - Update(context.Context, *hcloud.Network, hcloud.NetworkUpdateOpts) (*hcloud.Network, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_placement_group_client_base.go b/internal/hcapi2/zz_placement_group_client_base.go deleted file mode 100644 index 60aaa56f..00000000 --- a/internal/hcapi2/zz_placement_group_client_base.go +++ /dev/null @@ -1,21 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// PlacementGroupClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.PlacementGroupClient". -type PlacementGroupClientBase interface { - All(context.Context) ([]*hcloud.PlacementGroup, error) - AllWithOpts(context.Context, hcloud.PlacementGroupListOpts) ([]*hcloud.PlacementGroup, error) - Create(context.Context, hcloud.PlacementGroupCreateOpts) (hcloud.PlacementGroupCreateResult, *hcloud.Response, error) - Delete(context.Context, *hcloud.PlacementGroup) (*hcloud.Response, error) - Get(context.Context, string) (*hcloud.PlacementGroup, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.PlacementGroup, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.PlacementGroup, *hcloud.Response, error) - List(context.Context, hcloud.PlacementGroupListOpts) ([]*hcloud.PlacementGroup, *hcloud.Response, error) - Update(context.Context, *hcloud.PlacementGroup, hcloud.PlacementGroupUpdateOpts) (*hcloud.PlacementGroup, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_primary_ip_client_base.go b/internal/hcapi2/zz_primary_ip_client_base.go deleted file mode 100644 index 896b1c35..00000000 --- a/internal/hcapi2/zz_primary_ip_client_base.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// PrimaryIPClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.PrimaryIPClient". -type PrimaryIPClientBase interface { - All(context.Context) ([]*hcloud.PrimaryIP, error) - AllWithOpts(context.Context, hcloud.PrimaryIPListOpts) ([]*hcloud.PrimaryIP, error) - Assign(context.Context, hcloud.PrimaryIPAssignOpts) (*hcloud.Action, *hcloud.Response, error) - ChangeDNSPtr(context.Context, hcloud.PrimaryIPChangeDNSPtrOpts) (*hcloud.Action, *hcloud.Response, error) - ChangeProtection(context.Context, hcloud.PrimaryIPChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) - Create(context.Context, hcloud.PrimaryIPCreateOpts) (*hcloud.PrimaryIPCreateResult, *hcloud.Response, error) - Delete(context.Context, *hcloud.PrimaryIP) (*hcloud.Response, error) - Get(context.Context, string) (*hcloud.PrimaryIP, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.PrimaryIP, *hcloud.Response, error) - GetByIP(context.Context, string) (*hcloud.PrimaryIP, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.PrimaryIP, *hcloud.Response, error) - List(context.Context, hcloud.PrimaryIPListOpts) ([]*hcloud.PrimaryIP, *hcloud.Response, error) - Unassign(context.Context, int64) (*hcloud.Action, *hcloud.Response, error) - Update(context.Context, *hcloud.PrimaryIP, hcloud.PrimaryIPUpdateOpts) (*hcloud.PrimaryIP, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_rdns_client_base.go b/internal/hcapi2/zz_rdns_client_base.go deleted file mode 100644 index f9c4a78f..00000000 --- a/internal/hcapi2/zz_rdns_client_base.go +++ /dev/null @@ -1,14 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" - "net" -) - -// RDNSClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.RDNSClient". -type RDNSClientBase interface { - ChangeDNSPtr(context.Context, hcloud.RDNSSupporter, net.IP, *string) (*hcloud.Action, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_server_client_base.go b/internal/hcapi2/zz_server_client_base.go deleted file mode 100644 index bde61ae7..00000000 --- a/internal/hcapi2/zz_server_client_base.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// ServerClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.ServerClient". -type ServerClientBase interface { - AddToPlacementGroup(context.Context, *hcloud.Server, *hcloud.PlacementGroup) (*hcloud.Action, *hcloud.Response, error) - All(context.Context) ([]*hcloud.Server, error) - AllWithOpts(context.Context, hcloud.ServerListOpts) ([]*hcloud.Server, error) - AttachISO(context.Context, *hcloud.Server, *hcloud.ISO) (*hcloud.Action, *hcloud.Response, error) - AttachToNetwork(context.Context, *hcloud.Server, hcloud.ServerAttachToNetworkOpts) (*hcloud.Action, *hcloud.Response, error) - ChangeAliasIPs(context.Context, *hcloud.Server, hcloud.ServerChangeAliasIPsOpts) (*hcloud.Action, *hcloud.Response, error) - ChangeDNSPtr(context.Context, *hcloud.Server, string, *string) (*hcloud.Action, *hcloud.Response, error) - ChangeProtection(context.Context, *hcloud.Server, hcloud.ServerChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) - ChangeType(context.Context, *hcloud.Server, hcloud.ServerChangeTypeOpts) (*hcloud.Action, *hcloud.Response, error) - Create(context.Context, hcloud.ServerCreateOpts) (hcloud.ServerCreateResult, *hcloud.Response, error) - CreateImage(context.Context, *hcloud.Server, *hcloud.ServerCreateImageOpts) (hcloud.ServerCreateImageResult, *hcloud.Response, error) - Delete(context.Context, *hcloud.Server) (*hcloud.Response, error) - DeleteWithResult(context.Context, *hcloud.Server) (*hcloud.ServerDeleteResult, *hcloud.Response, error) - DetachFromNetwork(context.Context, *hcloud.Server, hcloud.ServerDetachFromNetworkOpts) (*hcloud.Action, *hcloud.Response, error) - DetachISO(context.Context, *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) - DisableBackup(context.Context, *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) - DisableRescue(context.Context, *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) - EnableBackup(context.Context, *hcloud.Server, string) (*hcloud.Action, *hcloud.Response, error) - EnableRescue(context.Context, *hcloud.Server, hcloud.ServerEnableRescueOpts) (hcloud.ServerEnableRescueResult, *hcloud.Response, error) - Get(context.Context, string) (*hcloud.Server, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.Server, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.Server, *hcloud.Response, error) - GetMetrics(context.Context, *hcloud.Server, hcloud.ServerGetMetricsOpts) (*hcloud.ServerMetrics, *hcloud.Response, error) - List(context.Context, hcloud.ServerListOpts) ([]*hcloud.Server, *hcloud.Response, error) - Poweroff(context.Context, *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) - Poweron(context.Context, *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) - Reboot(context.Context, *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) - Rebuild(context.Context, *hcloud.Server, hcloud.ServerRebuildOpts) (*hcloud.Action, *hcloud.Response, error) - RebuildWithResult(context.Context, *hcloud.Server, hcloud.ServerRebuildOpts) (hcloud.ServerRebuildResult, *hcloud.Response, error) - RemoveFromPlacementGroup(context.Context, *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) - RequestConsole(context.Context, *hcloud.Server) (hcloud.ServerRequestConsoleResult, *hcloud.Response, error) - Reset(context.Context, *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) - ResetPassword(context.Context, *hcloud.Server) (hcloud.ServerResetPasswordResult, *hcloud.Response, error) - Shutdown(context.Context, *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) - Update(context.Context, *hcloud.Server, hcloud.ServerUpdateOpts) (*hcloud.Server, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_server_type_client_base.go b/internal/hcapi2/zz_server_type_client_base.go deleted file mode 100644 index ed26b606..00000000 --- a/internal/hcapi2/zz_server_type_client_base.go +++ /dev/null @@ -1,18 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// ServerTypeClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.ServerTypeClient". -type ServerTypeClientBase interface { - All(context.Context) ([]*hcloud.ServerType, error) - AllWithOpts(context.Context, hcloud.ServerTypeListOpts) ([]*hcloud.ServerType, error) - Get(context.Context, string) (*hcloud.ServerType, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.ServerType, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.ServerType, *hcloud.Response, error) - List(context.Context, hcloud.ServerTypeListOpts) ([]*hcloud.ServerType, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_ssh_key_client_base.go b/internal/hcapi2/zz_ssh_key_client_base.go deleted file mode 100644 index 4bb6b07d..00000000 --- a/internal/hcapi2/zz_ssh_key_client_base.go +++ /dev/null @@ -1,22 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// SSHKeyClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.SSHKeyClient". -type SSHKeyClientBase interface { - All(context.Context) ([]*hcloud.SSHKey, error) - AllWithOpts(context.Context, hcloud.SSHKeyListOpts) ([]*hcloud.SSHKey, error) - Create(context.Context, hcloud.SSHKeyCreateOpts) (*hcloud.SSHKey, *hcloud.Response, error) - Delete(context.Context, *hcloud.SSHKey) (*hcloud.Response, error) - Get(context.Context, string) (*hcloud.SSHKey, *hcloud.Response, error) - GetByFingerprint(context.Context, string) (*hcloud.SSHKey, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.SSHKey, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.SSHKey, *hcloud.Response, error) - List(context.Context, hcloud.SSHKeyListOpts) ([]*hcloud.SSHKey, *hcloud.Response, error) - Update(context.Context, *hcloud.SSHKey, hcloud.SSHKeyUpdateOpts) (*hcloud.SSHKey, *hcloud.Response, error) -} diff --git a/internal/hcapi2/zz_volume_client_base.go b/internal/hcapi2/zz_volume_client_base.go deleted file mode 100644 index 0e5187e5..00000000 --- a/internal/hcapi2/zz_volume_client_base.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by interfacer; DO NOT EDIT - -package hcapi2 - -import ( - "context" - "github.com/hetznercloud/hcloud-go/v2/hcloud" -) - -// VolumeClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/v2/hcloud.VolumeClient". -type VolumeClientBase interface { - All(context.Context) ([]*hcloud.Volume, error) - AllWithOpts(context.Context, hcloud.VolumeListOpts) ([]*hcloud.Volume, error) - Attach(context.Context, *hcloud.Volume, *hcloud.Server) (*hcloud.Action, *hcloud.Response, error) - AttachWithOpts(context.Context, *hcloud.Volume, hcloud.VolumeAttachOpts) (*hcloud.Action, *hcloud.Response, error) - ChangeProtection(context.Context, *hcloud.Volume, hcloud.VolumeChangeProtectionOpts) (*hcloud.Action, *hcloud.Response, error) - Create(context.Context, hcloud.VolumeCreateOpts) (hcloud.VolumeCreateResult, *hcloud.Response, error) - Delete(context.Context, *hcloud.Volume) (*hcloud.Response, error) - Detach(context.Context, *hcloud.Volume) (*hcloud.Action, *hcloud.Response, error) - Get(context.Context, string) (*hcloud.Volume, *hcloud.Response, error) - GetByID(context.Context, int64) (*hcloud.Volume, *hcloud.Response, error) - GetByName(context.Context, string) (*hcloud.Volume, *hcloud.Response, error) - List(context.Context, hcloud.VolumeListOpts) ([]*hcloud.Volume, *hcloud.Response, error) - Resize(context.Context, *hcloud.Volume, int) (*hcloud.Action, *hcloud.Response, error) - Update(context.Context, *hcloud.Volume, hcloud.VolumeUpdateOpts) (*hcloud.Volume, *hcloud.Response, error) -} diff --git a/script/install_tools.sh b/script/install_tools.sh index 3fa27bce..243dde4d 100755 --- a/script/install_tools.sh +++ b/script/install_tools.sh @@ -6,4 +6,3 @@ set -o nounset go install github.com/boumenot/gocover-cobertura go install github.com/golang/mock/mockgen -go install github.com/rjeczalik/interfaces/cmd/interfacer diff --git a/tools.go b/tools.go index 83b59275..750f4829 100644 --- a/tools.go +++ b/tools.go @@ -8,5 +8,4 @@ import ( _ "github.com/boumenot/gocover-cobertura" _ "github.com/golang/mock/mockgen" _ "github.com/google/go-cmp/cmp" - _ "github.com/rjeczalik/interfaces/cmd/interfacer" )