hcloudutil

package
v1.60.1 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIErrorDiagnostics

func APIErrorDiagnostics(err error) diag.Diagnostics

APIErrorDiagnostics creates diagnostics from the errors that occurred during an API requests.

func APIErrorIsNotFound

func APIErrorIsNotFound(err error) bool

APIErrorIsNotFound check whether the error is an API request Not Found error.

func ActionErrorDiagnostic added in v1.57.0

func ActionErrorDiagnostic(action *hcloud.Action) diag.Diagnostic

func ActionWaitTimeoutDiagnostic added in v1.57.0

func ActionWaitTimeoutDiagnostic(actions ...*hcloud.Action) diag.Diagnostic

func ConfigureClient

func ConfigureClient(providerData any) (*hcloud.Client, diag.Diagnostics)

func ErrorToDiag

func ErrorToDiag(err error) diag.Diagnostics

ErrorToDiag creates a terraform diag When some hcloud errors are passed it enriches the default Error() function from them with a few more details to make them more understandable for users

func NotFoundDiagnostic added in v1.48.0

func NotFoundDiagnostic(resourceName string, key string, value any) diag.Diagnostic

func SettleActions added in v1.57.0

func SettleActions(ctx context.Context, client ActionWaiter, actions ...*hcloud.Action) (diags diag.Diagnostics)

func TerraformLabelsToHCloud

func TerraformLabelsToHCloud(ctx context.Context, inputLabels types.Map, outputLabels *map[string]string) diag.Diagnostics

Types

type ActionWaiter added in v1.57.0

type ActionWaiter interface {
	WaitForFunc(ctx context.Context, handleUpdate func(update *hcloud.Action) error, actions ...*hcloud.Action) error
}

Jump to

Keyboard shortcuts

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