33 lines
1.1 KiB
Go
33 lines
1.1 KiB
Go
// Code generated by "mapstructure-to-hcl2 -type KeyValue"; DO NOT EDIT.
|
|
package hcl2template
|
|
|
|
import (
|
|
"github.com/hashicorp/hcl/v2/hcldec"
|
|
"github.com/zclconf/go-cty/cty"
|
|
)
|
|
|
|
// FlatKeyValue is an auto-generated flat version of KeyValue.
|
|
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
|
|
type FlatKeyValue struct {
|
|
Key *string `cty:"key"`
|
|
Value *string `cty:"value"`
|
|
}
|
|
|
|
// FlatMapstructure returns a new FlatKeyValue.
|
|
// FlatKeyValue is an auto-generated flat version of KeyValue.
|
|
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
|
|
func (*KeyValue) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
|
|
return new(FlatKeyValue)
|
|
}
|
|
|
|
// HCL2Spec returns the hcl spec of a KeyValue.
|
|
// This spec is used by HCL to read the fields of KeyValue.
|
|
// The decoded values from this spec will then be applied to a FlatKeyValue.
|
|
func (*FlatKeyValue) HCL2Spec() map[string]hcldec.Spec {
|
|
s := map[string]hcldec.Spec{
|
|
"key": &hcldec.AttrSpec{Name: "key", Type: cty.String, Required: false},
|
|
"value": &hcldec.AttrSpec{Name: "value", Type: cty.String, Required: false},
|
|
}
|
|
return s
|
|
}
|