github.com/aws-cloudformation/cloudformation-cli-go-plugin@v1.2.0/python/rpdk/go/templates/config.go.tple (about) 1 // Code generated by 'cfn generate', changes will be undone by the next invocation. DO NOT EDIT. 2 // Updates to this type are made my editing the schema file and executing the 'generate' command. 3 package resource 4 import "github.com/aws-cloudformation/cloudformation-cli-go-plugin/cfn/handler" 5 6 {% for model_name, properties in models.items() %} 7 8 {% if model_name == "ResourceModel" %} 9 {% set model_name = "Model" %} 10 {% else %} 11 {% set model_name = model_name | uppercase_first_letter %} 12 {% endif %} 13 // {{model_name}} is autogenerated from the json schema 14 type {{model_name}} struct { 15 {% for name, type in properties.items() %} 16 {{ name|uppercase_first_letter }} {{ type|translate_type }} `json:",omitempty"` 17 {% endfor %} 18 } 19 20 {% endfor %} 21 22 // Configuration returns a resource's configuration. 23 func Configuration(req handler.Request) (*TypeConfiguration, error) { 24 // Populate the type configuration 25 typeConfig := &TypeConfiguration{} 26 if err := req.UnmarshalTypeConfig(typeConfig); err != nil { 27 return typeConfig, err 28 } 29 return typeConfig, nil 30 }