Documentation
¶
Overview ¶
Package value contains helper functions to convert from cty.Value to Go types.
The input value must still conform to the implied type of the given schema, or else these functions may produce garbage results or panic. This is usually okay because type consistency is enforced when deserializing the value returned from the provider over the RPC wire protocol anyway.
Index ¶
- func Bool(rawValue cty.Value) *bool
- func Difference(data *schema.ResourceData, key string) ([]interface{}, []interface{})
- func Float64(rawValue cty.Value) *float64
- func Int(rawValue cty.Value) *int
- func Map(rawValue cty.Value) map[string]interface{}
- func MapFromJSON(rawValue cty.Value) (map[string]interface{}, error)
- func MapOfStrings(rawValue cty.Value) *map[string]string
- func String(rawValue cty.Value) *string
- func Strings(rawValues cty.Value) *[]string
- func Time(rawValue cty.Value) *time.Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Difference ¶
func Difference(data *schema.ResourceData, key string) ([]interface{}, []interface{})
Difference accesses the value held by key and type asserts it to a set. It then compares its changes if any and returns what needs to be added and what needs to be removed.
func Float64 ¶
Float64 evaluates the typed value of the value and coerces to a pointer of a float64.
func MapFromJSON ¶
MapFromJSON evaluates the typed value of the value and coerces to a map[string]interface{}.
func MapOfStrings ¶
MapOfStrings evaluates the typed value of the value and coerces to a pointer of a map of strings.
func Strings ¶
Strings evaluates the typed value of the value and coerces to a pointer of a slice of strings.
func Time ¶ added in v1.7.0
Time evaluates the typed value of the value and coerces to a pointer of a string, which is then converted to a `time.Time` according to ISO 3339 (ISO 8601 is largely the same in common use cases, see https://ijmacd.github.io/rfc3339-iso8601/ for differences).
Types ¶
This section is empty.