-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.hcl2spec.go
46 lines (42 loc) · 2.37 KB
/
main.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
35
36
37
38
39
40
41
42
43
44
45
46
// Code generated by "mapstructure-to-hcl2 -type DenoConfig"; DO NOT EDIT.
package main
import (
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/zclconf/go-cty/cty"
)
// FlatDenoConfig is an auto-generated flat version of DenoConfig.
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatDenoConfig struct {
Username *string `cty:"username"`
Password *string `cty:"password"`
LocalDenoBin *string `mapstructure:"local_deno_bin" cty:"local_deno_bin"`
SkipInstall *bool `cty:"skip_install"`
SkipProvision *bool `mapstructure:"skip_provision" cty:"skip_provision"`
RemoteFolder *string `mapstructure:"remote_folder" cty:"remote_folder"`
NoBundle *bool `cty:"no_bundle"`
Scripts []string `cty:"scripts"`
TargetDenoVersion *string `mapstructure:"target_deno_version" cty:"target_deno_version"`
}
// FlatMapstructure returns a new FlatDenoConfig.
// FlatDenoConfig is an auto-generated flat version of DenoConfig.
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*DenoConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
return new(FlatDenoConfig)
}
// HCL2Spec returns the hcl spec of a DenoConfig.
// This spec is used by HCL to read the fields of DenoConfig.
// The decoded values from this spec will then be applied to a FlatDenoConfig.
func (*FlatDenoConfig) HCL2Spec() map[string]hcldec.Spec {
s := map[string]hcldec.Spec{
"username": &hcldec.AttrSpec{Name: "username", Type: cty.String, Required: false},
"password": &hcldec.AttrSpec{Name: "password", Type: cty.String, Required: false},
"local_deno_bin": &hcldec.AttrSpec{Name: "local_deno_bin", Type: cty.String, Required: false},
"skip_install": &hcldec.AttrSpec{Name: "skip_install", Type: cty.Bool, Required: false},
"skip_provision": &hcldec.AttrSpec{Name: "skip_provision", Type: cty.Bool, Required: false},
"remote_folder": &hcldec.AttrSpec{Name: "remote_folder", Type: cty.String, Required: false},
"no_bundle": &hcldec.AttrSpec{Name: "no_bundle", Type: cty.Bool, Required: false},
"scripts": &hcldec.AttrSpec{Name: "scripts", Type: cty.List(cty.String), Required: false},
"target_deno_version": &hcldec.AttrSpec{Name: "target_deno_version", Type: cty.String, Required: false},
}
return s
}