-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.hcl2spec.go
34 lines (30 loc) · 1.43 KB
/
config.hcl2spec.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Code generated by "mapstructure-to-hcl2 -type FlasherConfig"; DO NOT EDIT.
package main
import (
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/zclconf/go-cty/cty"
)
// FlatFlasherConfig is an auto-generated flat version of FlasherConfig.
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatFlasherConfig struct {
Device *string `mapstructure:"device" cty:"device"`
Interactive *bool `mapstructure:"interactive" cty:"interactive"`
BlockSize *int `mapstructure:"block_size" cty:"block_size"`
}
// FlatMapstructure returns a new FlatFlasherConfig.
// FlatFlasherConfig is an auto-generated flat version of FlasherConfig.
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*FlasherConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
return new(FlatFlasherConfig)
}
// HCL2Spec returns the hcl spec of a FlasherConfig.
// This spec is used by HCL to read the fields of FlasherConfig.
// The decoded values from this spec will then be applied to a FlatFlasherConfig.
func (*FlatFlasherConfig) HCL2Spec() map[string]hcldec.Spec {
s := map[string]hcldec.Spec{
"device": &hcldec.AttrSpec{Name: "device", Type: cty.String, Required: false},
"interactive": &hcldec.AttrSpec{Name: "interactive", Type: cty.Bool, Required: false},
"block_size": &hcldec.AttrSpec{Name: "block_size", Type: cty.Number, Required: false},
}
return s
}