Documentation ¶
Overview ¶
Package expand contains helper functions used to map terraform configuration to an API object.
Index ¶
- func Bool(d helper.ResourceData, key string) (b bool)
- func BoolPtr(d helper.ResourceData, key string) (b *bool)
- func Complex128(d helper.ResourceData, key string) (c complex128)
- func Complex128Ptr(d helper.ResourceData, key string) (c *complex128)
- func Complex64(d helper.ResourceData, key string) (c complex64)
- func Complex64Ptr(d helper.ResourceData, key string) (c *complex64)
- func Diff(d helper.ResourceData, key string) (add []interface{}, rm []interface{})
- func Float32(d helper.ResourceData, key string) (f float32)
- func Float32Ptr(d helper.ResourceData, key string) (f *float32)
- func Float64(d helper.ResourceData, key string) (f float64)
- func Float64Ptr(d helper.ResourceData, key string) (f *float64)
- func Int(d helper.ResourceData, key string) (i int)
- func Int32(d helper.ResourceData, key string) (i int32)
- func Int32Ptr(d helper.ResourceData, key string) (i *int32)
- func Int64(d helper.ResourceData, key string) (i int64)
- func Int64Ptr(d helper.ResourceData, key string) (i *int64)
- func IntPtr(d helper.ResourceData, key string) (i *int)
- func JSON(d helper.ResourceData, key string) (m map[string]interface{}, err error)
- func Map(d helper.ResourceData, key string) (m map[string]interface{})
- func Slice(d helper.ResourceData, key string) (s []interface{})
- func String(d helper.ResourceData, key string) (s string)
- func StringPtr(d helper.ResourceData, key string) (s *string)
- func Uint(d helper.ResourceData, key string) (u uint)
- func Uint32(d helper.ResourceData, key string) (u uint32)
- func Uint32Ptr(d helper.ResourceData, key string) (u *uint32)
- func Uint64(d helper.ResourceData, key string) (u uint64)
- func Uint64Ptr(d helper.ResourceData, key string) (u *uint64)
- func UintPtr(d helper.ResourceData, key string) (u *uint)
- type Iterator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
func Bool(d helper.ResourceData, key string) (b bool)
Bool accesses the value held by key and type asserts it as a bool.
func BoolPtr ¶
func BoolPtr(d helper.ResourceData, key string) (b *bool)
BoolPtr accesses the value held by key and type asserts it as a pointer to a bool.
func Complex128 ¶
func Complex128(d helper.ResourceData, key string) (c complex128)
Complex128 accesses the value held by key and type asserts it as a complex128.
func Complex128Ptr ¶
func Complex128Ptr(d helper.ResourceData, key string) (c *complex128)
Complex128Ptr accesses the value held by key and type asserts it as a pointer to a complex128.
func Complex64 ¶
func Complex64(d helper.ResourceData, key string) (c complex64)
Complex64 accesses the value held by key and type asserts it as a complex64.
func Complex64Ptr ¶
func Complex64Ptr(d helper.ResourceData, key string) (c *complex64)
Complex64Ptr accesses the value held by key and type asserts it as a pointer to a complex64.
func Diff ¶
func Diff(d helper.ResourceData, key string) (add []interface{}, rm []interface{})
Diff accesses the value held by key and type asserts it to a set. It then compares it's changes if any and returns what needs to be added and what needs to be removed.
func Float32 ¶
func Float32(d helper.ResourceData, key string) (f float32)
Float32 accesses the value held by key and type asserts it as a float32.
func Float32Ptr ¶
func Float32Ptr(d helper.ResourceData, key string) (f *float32)
Float32Ptr accesses the value held by key and type asserts it as a pointer to a float32.
func Float64 ¶
func Float64(d helper.ResourceData, key string) (f float64)
Float64 accesses the value held by key and type asserts it as a float64.
func Float64Ptr ¶
func Float64Ptr(d helper.ResourceData, key string) (f *float64)
Float64Ptr accesses the value held by key and type asserts it as a pointer to a float64.
func Int ¶
func Int(d helper.ResourceData, key string) (i int)
Int accesses the value held by key and type asserts it as a int.
func Int32 ¶
func Int32(d helper.ResourceData, key string) (i int32)
Int32 accesses the value held by key and type asserts it as a int32.
func Int32Ptr ¶
func Int32Ptr(d helper.ResourceData, key string) (i *int32)
Int32Ptr accesses the value held by key and type asserts it as a pointer to a int32.
func Int64 ¶
func Int64(d helper.ResourceData, key string) (i int64)
Int64 accesses the value held by key and type asserts it as a int64.
func Int64Ptr ¶
func Int64Ptr(d helper.ResourceData, key string) (i *int64)
Int64Ptr accesses the value held by key and type asserts it as a pointer to a int64.
func IntPtr ¶
func IntPtr(d helper.ResourceData, key string) (i *int)
IntPtr accesses the value held by key and type asserts it as a pointer to a int.
func JSON ¶
func JSON(d helper.ResourceData, key string) (m map[string]interface{}, err error)
JSON accesses the value held by key and unmarshals it into a map.
func Map ¶
func Map(d helper.ResourceData, key string) (m map[string]interface{})
Map accesses the value held by key and type asserts it to a map.
func Slice ¶
func Slice(d helper.ResourceData, key string) (s []interface{})
Slice accesses the value held by key and type asserts it to a slice.
func String ¶
func String(d helper.ResourceData, key string) (s string)
String accesses the value held by key and type asserts it as a string.
func StringPtr ¶
func StringPtr(d helper.ResourceData, key string) (s *string)
StringPtr accesses the value held by key and type asserts it as a pointer to a string.
func Uint ¶
func Uint(d helper.ResourceData, key string) (u uint)
Uint accesses the value held by key and type asserts it as a uint.
func Uint32 ¶
func Uint32(d helper.ResourceData, key string) (u uint32)
Uint32 accesses the value held by key and type asserts it as a uint32.
func Uint32Ptr ¶
func Uint32Ptr(d helper.ResourceData, key string) (u *uint32)
Uint32Ptr accesses the value held by key and type asserts it as a pointer to a uint32.
func Uint64 ¶
func Uint64(d helper.ResourceData, key string) (u uint64)
Uint64 accesses the value held by key and type asserts it as a uint64.
Types ¶
type Iterator ¶
type Iterator interface { // Elem iterates over all elements of the list or set, calling fn with each // iteration. // // The callback takes a Data interface as argument which is prefixed with // its parents key, making nested data access more convenient. // // The operation // // bar = d.Get("foo.0.bar").(string) // // can be expressed as // // List(d, "foo").Elem(func (d Data) { // bar = String(d, "bar") // }) // // making data access more intuitive for nested structures. Elem(func(d helper.ResourceData)) // Range iterates over all elements of the list, calling fn in each iteration. Range(func(k int, v interface{})) // List returns the underlying list as a Go slice. List() []interface{} }
Iterator enables access to the elements of a list or set.