hcloudutil

package
v1.48.0 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: MPL-2.0 Imports: 8 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 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 TerraformLabelsToHCloud

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

func WaitForAction

func WaitForAction(ctx context.Context, c hcloud.ActionWaiter, action *hcloud.Action) error

WaitForAction uses hcloud.ActionWaiter.WaitFor to wait for the completion of an action.

func WaitForActions

func WaitForActions(ctx context.Context, c hcloud.ActionWaiter, actions []*hcloud.Action) error

WaitForActions uses hcloud.ActionWaiter.WaitFor to wait for the completion of all actions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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