types

package
v0.0.0-...-d894801 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseTypesInt64ToString

func BaseTypesInt64ToString(value basetypes.Int64Value) string

func BoolTypeOrNil

func BoolTypeOrNil(b *bool) types.Bool

Get a types.Bool from the given bool pointer, handling if the pointer is nil

func CamelCaseToUnderscores

func CamelCaseToUnderscores(s string) string

func CheckListKeyMatch

func CheckListKeyMatch(k string, list []string) bool

func Contains

func Contains(slice []attr.Value, value attr.Value) bool

Check if an attribute slice contains a value

func ConvertToPrimitive

func ConvertToPrimitive(value attr.Value) interface{}

func CreateKeysFromAttrValues

func CreateKeysFromAttrValues(attrValues map[string]attr.Value) []string

func Float64TypeOrNil

func Float64TypeOrNil(f *float32) types.Float64

Get a types.Float64 from the given float32 pointer, handling if the pointer is nil

func FloatSetsEqual

func FloatSetsEqual(a, b []float64) bool

Check if two float slices representing sets are equal

func GetFloat64InterfaceSetOrNull

func GetFloat64InterfaceSetOrNull(i interface{}) types.Set

Get a types.Set from a slice of float64 or null set

func GetInt64InterfaceSetOrNull

func GetInt64InterfaceSetOrNull(i interface{}) types.Set

Get a types.Set from a slice of int64 or null set

func GetInt64Set

func GetInt64Set(values []int64) types.Set

Get a types.Set from a slice of int64

func GetInt64SetOrNull

func GetInt64SetOrNull(values []int64) types.Set

Get a types.Set from a slice of int64 or null set

func GetInterfaceStringSet

func GetInterfaceStringSet(i interface{}) types.Set

Get a types.Set from a slice of string

func GetNestedInterfaceKeyBoolValuePointer

func GetNestedInterfaceKeyBoolValuePointer(i interface{}, nestedKey string) *bool

Get a nested key value from given interface, handling if the value is nil

func GetNestedInterfaceKeyStringValue

func GetNestedInterfaceKeyStringValue(i interface{}, nestedKey string) types.String

Get a nested key value from given interface, handling if the value is nil

func GetStringMap

func GetStringMap(m *string) types.Map

Get types.Map from slice of Strings

func GetStringSet

func GetStringSet(values []string) types.Set

Get a types.Set from a slice of string

func Int64InterfaceTypeOrNil

func Int64InterfaceTypeOrNil(i interface{}) types.Int64

Get a types.Int64 from the given interface, handling if the pointer is nil

func Int64PointerToString

func Int64PointerToString(value int64) string

func Int64ToString

func Int64ToString(value types.Int64) string

func Int64TypeOrNil

func Int64TypeOrNil(i *int64) types.Int64

Get a types.Int64 from the given int32 pointer, handling if the pointer is nil

func InterfaceBoolPointerValue

func InterfaceBoolPointerValue(i interface{}) *bool

Get a types.Bool from the given interface pointer, handling if the interface is nil

func InterfaceBoolTypeOrNull

func InterfaceBoolTypeOrNull(i interface{}) types.Bool

Get a types.Bool from the given interface pointer, handling if the interface is nil

func InterfaceFloat64TypeOrNull

func InterfaceFloat64TypeOrNull(i interface{}) types.Float64

Get a types.Int64 from the given interface, handling if the pointer is nil

func InterfaceFloatSetValue

func InterfaceFloatSetValue(values []interface{}) []float64

func InterfaceStringOrNil

func InterfaceStringOrNil(i interface{}) string

Get a types.String from the given interface pointer, handling if the interface is nil

func InterfaceStringPointerValue

func InterfaceStringPointerValue(i interface{}) *string

Get a string pointer from the given interface, handling if the interface is nil

func IsDefined

func IsDefined(value attr.Value) bool

Return true if this value represents a defined (non-null and non-unknown) value

func IsEmptyString

func IsEmptyString(str types.String) bool

Return true if this types.String represents an empty (but non-null and non-unknown) string

func IsNonEmptyList

func IsNonEmptyList(l types.List) bool

func IsNonEmptyMap

func IsNonEmptyMap(m types.Map) bool

func IsNonEmptyObj

func IsNonEmptyObj(obj types.Object) bool

func IsNonEmptyString

func IsNonEmptyString(str types.String) bool

Return true if this types.String represents a non-empty, non-null, non-unknown string

func MapValuesToClientMap

func MapValuesToClientMap(mv basetypes.MapValue, con context.Context) *map[string]interface{}

Converts the basetypes.MapValue to map[string]interface{} required for PingAccess Client

func MaptoObjValue

func MaptoObjValue(attributeTypes map[string]attr.Type, attributeValues map[string]attr.Value, diags diag.Diagnostics) basetypes.ObjectValue

Converts the map[string]attr.Type to basetypes.ObjectValue required for Terraform

func ObjValuesToClientMap

func ObjValuesToClientMap(obj types.Object) *map[string]interface{}

Converts the types.Object to *map[string]interface{} required for PingAccess Client

func ObjValuesToMapNoPointer

func ObjValuesToMapNoPointer(obj types.Object) map[string]interface{}

Converts the types.Object to map[string]interface{} required for PingAccess Client

func ObjectValuesToClientLink(obj types.Object, con context.Context) client.Link

Converts the types.Object to []client.Link required for PingAccess Client

func SetsEqual

func SetsEqual(a, b []string) bool

Check if two slices representing sets are equal

func StringInterfaceSetToFloat64OrNull

func StringInterfaceSetToFloat64OrNull(i interface{}) types.Set

Get a types.Set from a slice of strings and converts values to floats or null set

func StringSliceContains

func StringSliceContains(slice []string, value string) bool

Check if a string slice contains a value

func StringToInt64Pointer

func StringToInt64Pointer(value basetypes.StringValue) *int64

func StringToTF

func StringToTF(v string) basetypes.StringValue

func StringTypeOrNil

func StringTypeOrNil(str *string, useEmptyStringForNil bool) types.String

Get a types.String from the given string pointer, handling if the pointer is nil

func StringValueOrNull

func StringValueOrNull(value interface{}) types.String

func UnderscoresToCamelCase

func UnderscoresToCamelCase(s string) string

Types

type ProviderConfiguration

type ProviderConfiguration struct {
	HttpsHost string
	Username  string
	Password  string
}

Configuration used by the provider and resources

type ResourceConfiguration

type ResourceConfiguration struct {
	ProviderConfig ProviderConfiguration
	ApiClient      *client.APIClient
}

Configuration passed to resources

Jump to

Keyboard shortcuts

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