providerutil

package
v1.0.0-alpha7 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientFromProviderData

func ClientFromProviderData(providerData any, d *diag.Diagnostics) mittwaldv2.ClientBuilder

ClientFromProviderData is a helper function to extract the client from the provider data.

func EmbedDiag

func EmbedDiag[T any](resultValue T, resultDiag diag.Diagnostics) func(outDiag *diag.Diagnostics) T

func ErrorToDiag

func ErrorToDiag(err error) func(d *diag.Diagnostics, summary string)

func ErrorValueToDiag

func ErrorValueToDiag[T any](res T, err error) func(d *diag.Diagnostics, summary string) T

func ParseUUID

func ParseUUID(in string, d *diag.Diagnostics) uuid.UUID

Types

type WrappedError

type WrappedError[T any] struct {
	// contains filtered or unexported fields
}

func Try

func Try[T any](d *diag.Diagnostics, summary string) *WrappedError[T]

func (*WrappedError[T]) Do

func (w *WrappedError[T]) Do(err error)

func (*WrappedError[T]) DoVal

func (w *WrappedError[T]) DoVal(res T, err error) T

func (*WrappedError[T]) IgnoreNotFound

func (w *WrappedError[T]) IgnoreNotFound() *WrappedError[T]

Jump to

Keyboard shortcuts

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