Documentation ¶
Index ¶
Constants ¶
const TerraformIDFieldName = "id"
TerraformIDFieldName is a special field name that can be used to identify the value that should be storedin/retrieved from the ID field in Terraform.
Variables ¶
This section is empty.
Functions ¶
func MapStructByTag ¶
MapStructByTag takes a struct and target tag name present on fields in that struct, then converts it into a map[string]interface{}. The target tag should be of the format `myTag:"destinationFieldName"`, where `destinationFieldName` is a valid map[string] key.
func MarshalMapToURLValues ¶
MarshalMapToURLValues creates a url.Values from a map[string]string
func MarshalToTerraform ¶
func MarshalToTerraform(src interface{}, dest *schema.ResourceData, sm map[string]*schema.Schema) error
MarshalToTerraform takes a source struct (`src`), a destination Terraform *ResourceData (`dest`), and a Terraform schema map[string]*Schema and then marshals the source data into the destination data given a `terraform` tag present on the fields in the source struct.
func SimpleHashcode ¶
func SimpleHashcode(v interface{}) int
SimpleHashcode calculates a simple integer hashcode by iterating over all the fields/keys in a map, concating the values in buffer, then calculating the hashcode of that buffer.
Types ¶
This section is empty.