util

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckResponse

func CheckResponse(diags *diag.Diagnostics, message string, response StatusCodeProvider, errMessages ...any) bool

func If

func If[T any](condition bool, ifTrueValue T, elseValue T) T

func Int64NullDefault

func Int64NullDefault() defaults.Int64

func Int64ValueToNullable

func Int64ValueToNullable[T ~int](v types.Int64) nullable.Nullable[T]

func IntPointerToInt64Value

func IntPointerToInt64Value[T ~int](v *T) types.Int64

func MaybeSetClient

func MaybeSetClient(providerData any, target *cdn77.ClientWithResponsesInterface) diag.Diagnostic

func NullableIntToInt64Value

func NullableIntToInt64Value[T ~int](v nullable.Nullable[T]) types.Int64

func NullableToStringValue

func NullableToStringValue(v nullable.Nullable[string]) types.String

func Pointer

func Pointer[T any](v T) *T

func StringMapToMap

func StringMapToMap(
	ctx context.Context,
	diags *diag.Diagnostics,
	attrPath path.Path,
	m types.Map,
) (map[string]string, bool)

func StringSetToSlice

func StringSetToSlice(ctx context.Context, diags *diag.Diagnostics, attrPath path.Path, s types.Set) ([]string, bool)

func StringValueToNullable

func StringValueToNullable(v types.String) nullable.Nullable[string]

Types

type ResourceDataSourceSchemaConverter

type ResourceDataSourceSchemaConverter struct {
	// contains filtered or unexported fields
}

func NewResourceDataSourceSchemaConverter

func NewResourceDataSourceSchemaConverter(requiredAttrs ...string) *ResourceDataSourceSchemaConverter

func (*ResourceDataSourceSchemaConverter) Convert

type StatusCodeProvider

type StatusCodeProvider interface {
	StatusCode() int
}

Jump to

Keyboard shortcuts

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