Versions in this module Expand all Collapse all v1 v1.4.15 Oct 19, 2026 v1.4.14 Oct 12, 2026 v1.4.13 Oct 11, 2026 v1.4.12 Sep 23, 2026 v1.4.11 Sep 23, 2026 v1.4.10 Sep 23, 2026 v1.4.9 Sep 23, 2026 v1.4.8 Sep 23, 2026 v1.4.7 Sep 23, 2026 v1.4.6 Sep 21, 2026 v1.4.5 Sep 21, 2026 v1.4.4 Sep 21, 2026 v1.4.3 Sep 21, 2026 v1.4.2 Sep 20, 2026 v1.4.1 Sep 20, 2026 v1.4.0 Sep 16, 2026 v1.3.6 Sep 12, 2026 Changes in this version + const DefaultSnapshotWait + const DefaultTokenEnvVar + const ManagedByLabel + const ManagedByValue + var ErrDiskShrink = errors.New("disk shrink is not supported by Hetzner Cloud") + var ErrNoBackup = errors.New(...) + func ResolveToken(explicit, envVar string) (string, error) + type Action struct + Command string + Error *ActionError + ID int64 + Progress int + Status string + func Resize(ctx context.Context, client Client, req ResizeRequest) (*Action, error) + type ActionError struct + Code string + Message string + type Client interface + ChangeServerType func(ctx context.Context, serverID int64, targetType string, upgradeDisk bool) (*Action, error) + CreateServer func(ctx context.Context, req ProvisionRequest) (*Server, error) + CreateSnapshot func(ctx context.Context, serverID int64, description string) (*Image, *Action, error) + DeleteServer func(ctx context.Context, id int64) error + GetAction func(ctx context.Context, id int64) (*Action, error) + GetImage func(ctx context.Context, id int64) (*Image, error) + GetServer func(ctx context.Context, id int64) (*Server, error) + ListPrimaryIPs func(ctx context.Context, serverID int64) ([]PrimaryIP, error) + ListServerTypes func(ctx context.Context) ([]ServerType, error) + ListServers func(ctx context.Context, opts ListOptions) ([]Server, error) + SetPrimaryIPAutoDelete func(ctx context.Context, ipID int64, autoDelete bool) error + func NewHetznerClient(token string) Client + type DestroyRequest struct + ForceNoBackup bool + ReleaseIP bool + ServerID int64 + SnapshotWait time.Duration + TakeSnapshot bool + type DestroyResult struct + ReleasedIPs []PrimaryIP + RetainedIPs []PrimaryIP + SnapshotID int64 + func Destroy(ctx context.Context, client Client, req DestroyRequest) (*DestroyResult, error) + type Image struct + Description string + ID int64 + Status string + Type string + func TakeVerifiedSnapshot(ctx context.Context, client Client, serverID int64, description string, ...) (*Image, error) + type ListOptions struct + LabelSelector string + type PrimaryIP struct + AssigneeID int64 + AutoDelete bool + ID int64 + IP string + Type string + func ProtectOrReleaseIPs(ctx context.Context, client Client, serverID int64, release bool) (retained, released []PrimaryIP, err error) + type ProvisionRequest struct + Image string + Labels map[string]string + Location string + Name string + SSHKeys []string + ServerType string + UserData string + type ResizeRequest struct + ServerID int64 + TargetType string + UpgradeDisk bool + type Server struct + Created time.Time + ID int64 + IPv4 string + IPv4ID int64 + IPv6 string + IPv6ID int64 + Labels map[string]string + Location string + Name string + ServerType string + Status string + func List(ctx context.Context, client Client, opts ListOptions) ([]Server, error) + func Provision(ctx context.Context, client Client, req ProvisionRequest) (*Server, error) + type ServerType struct + Cores int + Disk int + Memory float64 + Name string