common

package
v1.3.0-prerelease.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool added in v1.3.0

func Bool(tfVal types.Bool) bool

func HandleErr

func HandleErr(res *ocmerrors.Error, err error) error

func IsGreaterThanOrEqual

func IsGreaterThanOrEqual(version1, version2 string) (bool, error)

func IsStringAttributeEmpty

func IsStringAttributeEmpty(param types.String) bool

func IsValidDomain

func IsValidDomain(candidate string) bool

func IsValidEmail

func IsValidEmail(candidate string) bool

func OptionalInt64 added in v1.3.0

func OptionalInt64(tfVal types.Int64) *int64

func OptionalList added in v1.3.0

func OptionalList(tfVal types.List) []string

func OptionalMap added in v1.3.0

func OptionalMap(tfVal types.Map) map[string]string

func OptionalString added in v1.3.0

func OptionalString(tfVal types.String) *string

func ShouldPatchBool

func ShouldPatchBool(state, plan types.Bool) (value bool, ok bool)

ShouldPatchBool changed checks if the change between the given state and plan requires sending a patch request to the server. If it does it return the value to add to the patch.

func ShouldPatchInt

func ShouldPatchInt(state, plan types.Int64) (value int64, ok bool)

shouldPatchInt changed checks if the change between the given state and plan requires sending a patch request to the server. If it does it returns the value to add to the patch.

func ShouldPatchMap

func ShouldPatchMap(state, plan types.Map) (types.Map, bool)

ShouldPatchMap changed checks if the change between the given state and plan requires sending a patch request to the server. If it does it return the value to add to the patch.

func ShouldPatchString

func ShouldPatchString(state, plan types.String) (value string, ok bool)

shouldPatchString changed checks if the change between the given state and plan requires sending a patch request to the server. If it does it returns the value to add to the patch.

func StringArrayToList

func StringArrayToList(arr []string) types.List

TF types converter functions

func StringListToArray

func StringListToArray(list types.List) ([]string, error)

Types

type AttributeValidator

type AttributeValidator struct {
	Desc      string
	MDDesc    string
	Validator func(ctx context.Context, req tfsdk.ValidateAttributeRequest, resp *tfsdk.ValidateAttributeResponse)
}

func (*AttributeValidator) Description

func (a *AttributeValidator) Description(context.Context) string

func (*AttributeValidator) MarkdownDescription

func (a *AttributeValidator) MarkdownDescription(context.Context) string

func (*AttributeValidator) Validate

Jump to

Keyboard shortcuts

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