hcapi2

package
v1.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateClient added in v1.25.0

type CertificateClient interface {
	CertificateClientBase
	Names() []string
	LabelKeys(string) []string
}

CertificateClient embeds the Hetzner Cloud Certificate client and provides some additional helper functions.

func NewCertificateClient added in v1.25.0

func NewCertificateClient(client CertificateClientBase) CertificateClient

type Client

type Client interface {
	Datacenter() DatacenterClient
	Firewall() FirewallClient
	FloatingIP() FloatingIPClient
	Image() ImageClient
	Location() LocationClient
	Network() NetworkClient
	Server() ServerClient
	ServerType() ServerTypeClient
	SSHKey() SSHKeyClient
	Volume() VolumeClient
	Certificate() CertificateClient
	LoadBalancer() LoadBalancerClient
	LoadBalancerType() LoadBalancerTypeClient
	ISO() ISOClient
	PlacementGroup() PlacementGroupClient
	RDNS() RDNSClient
	PrimaryIP() PrimaryIPClient
}

Client makes all API clients accessible via a single interface.

func NewClient

func NewClient(c *hcloud.Client) Client

NewClient creates a new CLI API client extending hcloud.Client.

type DatacenterClient

type DatacenterClient interface {
	DatacenterClientBase
	Names() []string
}

DatacenterClient embeds the Hetzner Cloud DataCenter client and provides some additional helper functions.

func NewDatacenterClient

func NewDatacenterClient(client DatacenterClientBase) DatacenterClient

type DatacenterClientBase

DatacenterClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/hcloud.DatacenterClient".

type FirewallClient

type FirewallClient interface {
	FirewallClientBase
	Names() []string
	LabelKeys(string) []string
}

func NewFirewallClient

func NewFirewallClient(client FirewallClientBase) FirewallClient

type FloatingIPClient

type FloatingIPClient interface {
	FloatingIPClientBase
	Names() []string
	LabelKeys(idOrName string) []string
}

FloatingIPClient embeds the hcloud FloatingIPClient (via an interface) and provides some additional helper functions.

func NewFloatingIPClient

func NewFloatingIPClient(client FloatingIPClientBase) FloatingIPClient

NewFloatingIPClient creates a new floating IP client.

type ISOClient added in v1.25.0

type ISOClient interface {
	ISOClientBase
	Names() []string
}

ISOClient embeds the Hetzner Cloud iso client and provides some additional helper functions.

func NewISOClient added in v1.25.0

func NewISOClient(client ISOClientBase) ISOClient

type ISOClientBase added in v1.25.0

ISOClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/hcloud.ISOClient".

type ImageClient

type ImageClient interface {
	ImageClientBase
	Names() []string
	LabelKeys(string) []string
}

ImageClient embeds the Hetzner Cloud Image client and provides some additional helper functions.

func NewImageClient

func NewImageClient(client ImageClientBase) ImageClient

type ImageClientBase

ImageClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/hcloud.ImageClient".

type LoadBalancerClient added in v1.25.0

type LoadBalancerClient interface {
	LoadBalancerClientBase
	LoadBalancerName(id int) string
	Names() []string
	LabelKeys(string) []string
}

LoadBalancerClient embeds the Hetzner Cloud LoadBalancer client and provides some additional helper functions.

func NewLoadBalancerClient added in v1.25.0

func NewLoadBalancerClient(client LoadBalancerClientBase) LoadBalancerClient

type LoadBalancerClientBase added in v1.25.0

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, int) (*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)
}

LoadBalancerClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/hcloud.LoadBalancerClient".

type LoadBalancerTypeClient added in v1.25.0

type LoadBalancerTypeClient interface {
	LoadBalancerTypeClientBase
	Names() []string
	LoadBalancerTypeName(id int) string
	LoadBalancerTypeDescription(id int) string
}

func NewLoadBalancerTypeClient added in v1.25.0

func NewLoadBalancerTypeClient(client LoadBalancerTypeClientBase) LoadBalancerTypeClient

type LoadBalancerTypeClientBase added in v1.25.0

LoadBalancerTypeClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/hcloud.LoadBalancerTypeClient".

type LocationClient

type LocationClient interface {
	LocationClientBase
	Names() []string
	NetworkZones() []string
}

LocationClient embeds the Hetzner Cloud Location client and provides some additional helper functions.

func NewLocationClient

func NewLocationClient(client LocationClientBase) LocationClient

type LocationClientBase

LocationClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/hcloud.LocationClient".

type NetworkClient

type NetworkClient interface {
	NetworkClientBase
	Names() []string
	Name(int) string
	LabelKeys(string) []string
}

NetworkClient embeds the Hetzner Cloud Network client and provides some additional helper functions.

func NewNetworkClient

func NewNetworkClient(client NetworkClientBase) NetworkClient

type NetworkClientBase

NetworkClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/hcloud.NetworkClient".

type PlacementGroupClient added in v1.27.0

type PlacementGroupClient interface {
	PlacementGroupClientBase
	Names() []string
	LabelKeys(string) []string
}

func NewPlacementGroupClient added in v1.27.0

func NewPlacementGroupClient(client PlacementGroupClientBase) PlacementGroupClient

type PrimaryIPClient added in v1.30.0

type PrimaryIPClient interface {
	PrimaryIPClientBase
	Names() []string
	IPv4Names() []string
	IPv6Names() []string
	LabelKeys(idOrName string) []string
}

PrimaryIPClient embeds the hcloud PrimaryIPClient (via an interface) and provides some additional helper functions.

func NewPrimaryIPClient added in v1.30.0

func NewPrimaryIPClient(client PrimaryIPClientBase) PrimaryIPClient

NewPrimaryIPClient creates a new primary IP client.

type RDNSClient added in v1.28.1

type RDNSClient interface {
	RDNSClientBase
}

NewRDNSClient embeds the Hetzner Cloud rdns client.

func NewRDNSClient added in v1.28.1

func NewRDNSClient(client RDNSClientBase) RDNSClient

type RDNSClientBase added in v1.28.1

type RDNSClientBase interface {
	ChangeDNSPtr(context.Context, hcloud.RDNSSupporter, net.IP, *string) (*hcloud.Action, *hcloud.Response, error)
}

RDNSClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/hcloud.RDNSClient".

type SSHKeyClient

type SSHKeyClient interface {
	SSHKeyClientBase
	Names() []string
	LabelKeys(idOrName string) []string
}

SSHKeyClient embeds the Hetzner Cloud SSHKey client and provides some additional helper functions.

func NewSSHKeyClient

func NewSSHKeyClient(client SSHKeyClientBase) SSHKeyClient

type SSHKeyClientBase

SSHKeyClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/hcloud.SSHKeyClient".

type ServerClient

type ServerClient interface {
	ServerClientBase
	ServerName(id int) string
	Names() []string
	LabelKeys(idOrName string) []string
}

func NewServerClient

func NewServerClient(client *hcloud.ServerClient) ServerClient

type ServerClientBase

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, int) (*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)
}

ServerClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/hcloud.ServerClient".

type ServerTypeClient

type ServerTypeClient interface {
	ServerTypeClientBase
	Names() []string
	ServerTypeName(id int) string
	ServerTypeDescription(id int) string
}

func NewServerTypeClient

func NewServerTypeClient(client ServerTypeClientBase) ServerTypeClient

type ServerTypeClientBase

ServerTypeClientBase is an interface generated for "github.com/hetznercloud/hcloud-go/hcloud.ServerTypeClient".

type VolumeClient

type VolumeClient interface {
	VolumeClientBase
	Names() []string
	LabelKeys(idOrName string) []string
}

VolumeClient embeds the Hetzner Cloud Volume client and provides some additional helper functions.

func NewVolumeClient

func NewVolumeClient(client VolumeClientBase) VolumeClient

Directories

Path Synopsis
Package hcapi2_mock is a generated GoMock package.
Package hcapi2_mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL