2019-12-17 05:25:56 -05:00
|
|
|
// Code generated by "mapstructure-to-hcl2 -type MockBuilder,MockCommunicator,RemoteCmd,MockProvisioner,MockPostProcessor"; DO NOT EDIT.
|
|
|
|
package packer
|
|
|
|
|
|
|
|
import (
|
2020-02-07 14:13:19 -05:00
|
|
|
"io"
|
|
|
|
|
2019-12-17 05:25:56 -05:00
|
|
|
"github.com/hashicorp/hcl/v2/hcldec"
|
|
|
|
"github.com/zclconf/go-cty/cty"
|
|
|
|
)
|
|
|
|
|
|
|
|
// FlatMockBuilder is an auto-generated flat version of MockBuilder.
|
|
|
|
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
type FlatMockBuilder struct {
|
HCL2: generate hcl tags with go-cty tags too (#9306)
This will allow to generate the config files:
```go
package main
import (
"fmt"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hclwrite"
"github.com/hashicorp/packer/builder/alicloud/ecs"
)
func main() {
name := "name"
app := ecs.FlatConfig{
AlicloudImageName: &name,
ECSSystemDiskMapping: &ecs.FlatAlicloudDiskDevice{
DiskName: &name,
},
}
f := hclwrite.NewEmptyFile()
block := gohcl.EncodeAsBlock(&app, `source "something" "something"`)
f.Body().AppendBlock(block)
fmt.Printf("%s", f.Bytes())
}
```
Will output:
```
source "something" "something" {
packer_user_variables = null
packer_sensitive_variables = null
image_name = "name"
image_share_account = null
image_unshare_account = null
image_copy_regions = null
image_copy_names = null
tags = null
tag = null
system_disk_mapping = { disk_category = null, disk_delete_with_instance = null, disk_descri
ption = null, disk_device = null, disk_encrypted = null, disk_name = "name", disk_size = null, disk_
snapshot_id = null }
image_disk_mappings = null
ssh_remote_tunnels = null
ssh_local_tunnels = null
ssh_public_key = null
ssh_private_key = null
}
```
This is a good first step for #9015 and #9282
fix #9304
2020-05-28 05:19:00 -04:00
|
|
|
ArtifactId *string `cty:"artifact_id" hcl:"artifact_id"`
|
|
|
|
PrepareWarnings []string `cty:"prepare_warnings" hcl:"prepare_warnings"`
|
|
|
|
RunErrResult *bool `cty:"run_err_result" hcl:"run_err_result"`
|
|
|
|
RunNilResult *bool `cty:"run_nil_result" hcl:"run_nil_result"`
|
|
|
|
PrepareCalled *bool `cty:"prepare_called" hcl:"prepare_called"`
|
|
|
|
PrepareConfig []interface{} `cty:"prepare_config" hcl:"prepare_config"`
|
|
|
|
RunCalled *bool `cty:"run_called" hcl:"run_called"`
|
|
|
|
RunHook Hook `cty:"run_hook" hcl:"run_hook"`
|
|
|
|
RunUi Ui `cty:"run_ui" hcl:"run_ui"`
|
|
|
|
CancelCalled *bool `cty:"cancel_called" hcl:"cancel_called"`
|
|
|
|
GeneratedVars []string `cty:"generated_vars" hcl:"generated_vars"`
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// FlatMapstructure returns a new FlatMockBuilder.
|
|
|
|
// FlatMockBuilder is an auto-generated flat version of MockBuilder.
|
|
|
|
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
func (*MockBuilder) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
|
|
|
|
return new(FlatMockBuilder)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HCL2Spec returns the hcl spec of a MockBuilder.
|
|
|
|
// This spec is used by HCL to read the fields of MockBuilder.
|
|
|
|
// The decoded values from this spec will then be applied to a FlatMockBuilder.
|
|
|
|
func (*FlatMockBuilder) HCL2Spec() map[string]hcldec.Spec {
|
|
|
|
s := map[string]hcldec.Spec{
|
|
|
|
"artifact_id": &hcldec.AttrSpec{Name: "artifact_id", Type: cty.String, Required: false},
|
|
|
|
"prepare_warnings": &hcldec.AttrSpec{Name: "prepare_warnings", Type: cty.List(cty.String), Required: false},
|
|
|
|
"run_err_result": &hcldec.AttrSpec{Name: "run_err_result", Type: cty.Bool, Required: false},
|
|
|
|
"run_nil_result": &hcldec.AttrSpec{Name: "run_nil_result", Type: cty.Bool, Required: false},
|
|
|
|
"prepare_called": &hcldec.AttrSpec{Name: "prepare_called", Type: cty.Bool, Required: false},
|
|
|
|
"prepare_config": &hcldec.AttrSpec{Name: "prepare_config", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
|
|
|
"run_called": &hcldec.AttrSpec{Name: "run_called", Type: cty.Bool, Required: false},
|
2020-01-07 05:44:22 -05:00
|
|
|
"run_hook": &hcldec.AttrSpec{Name: "run_hook", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
|
|
|
"run_ui": &hcldec.AttrSpec{Name: "run_ui", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
2019-12-17 05:25:56 -05:00
|
|
|
"cancel_called": &hcldec.AttrSpec{Name: "cancel_called", Type: cty.Bool, Required: false},
|
2019-12-17 16:49:16 -05:00
|
|
|
"generated_vars": &hcldec.AttrSpec{Name: "generated_vars", Type: cty.List(cty.String), Required: false},
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// FlatMockCommunicator is an auto-generated flat version of MockCommunicator.
|
|
|
|
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
type FlatMockCommunicator struct {
|
HCL2: generate hcl tags with go-cty tags too (#9306)
This will allow to generate the config files:
```go
package main
import (
"fmt"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hclwrite"
"github.com/hashicorp/packer/builder/alicloud/ecs"
)
func main() {
name := "name"
app := ecs.FlatConfig{
AlicloudImageName: &name,
ECSSystemDiskMapping: &ecs.FlatAlicloudDiskDevice{
DiskName: &name,
},
}
f := hclwrite.NewEmptyFile()
block := gohcl.EncodeAsBlock(&app, `source "something" "something"`)
f.Body().AppendBlock(block)
fmt.Printf("%s", f.Bytes())
}
```
Will output:
```
source "something" "something" {
packer_user_variables = null
packer_sensitive_variables = null
image_name = "name"
image_share_account = null
image_unshare_account = null
image_copy_regions = null
image_copy_names = null
tags = null
tag = null
system_disk_mapping = { disk_category = null, disk_delete_with_instance = null, disk_descri
ption = null, disk_device = null, disk_encrypted = null, disk_name = "name", disk_size = null, disk_
snapshot_id = null }
image_disk_mappings = null
ssh_remote_tunnels = null
ssh_local_tunnels = null
ssh_public_key = null
ssh_private_key = null
}
```
This is a good first step for #9015 and #9282
fix #9304
2020-05-28 05:19:00 -04:00
|
|
|
StartCalled *bool `cty:"start_called" hcl:"start_called"`
|
|
|
|
StartCmd *FlatRemoteCmd `cty:"start_cmd" hcl:"start_cmd"`
|
|
|
|
StartStderr *string `cty:"start_stderr" hcl:"start_stderr"`
|
|
|
|
StartStdout *string `cty:"start_stdout" hcl:"start_stdout"`
|
|
|
|
StartStdin *string `cty:"start_stdin" hcl:"start_stdin"`
|
|
|
|
StartExitStatus *int `cty:"start_exit_status" hcl:"start_exit_status"`
|
|
|
|
UploadCalled *bool `cty:"upload_called" hcl:"upload_called"`
|
|
|
|
UploadPath *string `cty:"upload_path" hcl:"upload_path"`
|
|
|
|
UploadData *string `cty:"upload_data" hcl:"upload_data"`
|
|
|
|
UploadDirDst *string `cty:"upload_dir_dst" hcl:"upload_dir_dst"`
|
|
|
|
UploadDirSrc *string `cty:"upload_dir_src" hcl:"upload_dir_src"`
|
|
|
|
UploadDirExclude []string `cty:"upload_dir_exclude" hcl:"upload_dir_exclude"`
|
|
|
|
DownloadDirDst *string `cty:"download_dir_dst" hcl:"download_dir_dst"`
|
|
|
|
DownloadDirSrc *string `cty:"download_dir_src" hcl:"download_dir_src"`
|
|
|
|
DownloadDirExclude []string `cty:"download_dir_exclude" hcl:"download_dir_exclude"`
|
|
|
|
DownloadCalled *bool `cty:"download_called" hcl:"download_called"`
|
|
|
|
DownloadPath *string `cty:"download_path" hcl:"download_path"`
|
|
|
|
DownloadData *string `cty:"download_data" hcl:"download_data"`
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// FlatMapstructure returns a new FlatMockCommunicator.
|
|
|
|
// FlatMockCommunicator is an auto-generated flat version of MockCommunicator.
|
|
|
|
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
func (*MockCommunicator) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
|
|
|
|
return new(FlatMockCommunicator)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HCL2Spec returns the hcl spec of a MockCommunicator.
|
|
|
|
// This spec is used by HCL to read the fields of MockCommunicator.
|
|
|
|
// The decoded values from this spec will then be applied to a FlatMockCommunicator.
|
|
|
|
func (*FlatMockCommunicator) HCL2Spec() map[string]hcldec.Spec {
|
|
|
|
s := map[string]hcldec.Spec{
|
|
|
|
"start_called": &hcldec.AttrSpec{Name: "start_called", Type: cty.Bool, Required: false},
|
|
|
|
"start_cmd": &hcldec.BlockSpec{TypeName: "start_cmd", Nested: hcldec.ObjectSpec((*FlatRemoteCmd)(nil).HCL2Spec())},
|
|
|
|
"start_stderr": &hcldec.AttrSpec{Name: "start_stderr", Type: cty.String, Required: false},
|
|
|
|
"start_stdout": &hcldec.AttrSpec{Name: "start_stdout", Type: cty.String, Required: false},
|
|
|
|
"start_stdin": &hcldec.AttrSpec{Name: "start_stdin", Type: cty.String, Required: false},
|
|
|
|
"start_exit_status": &hcldec.AttrSpec{Name: "start_exit_status", Type: cty.Number, Required: false},
|
|
|
|
"upload_called": &hcldec.AttrSpec{Name: "upload_called", Type: cty.Bool, Required: false},
|
|
|
|
"upload_path": &hcldec.AttrSpec{Name: "upload_path", Type: cty.String, Required: false},
|
|
|
|
"upload_data": &hcldec.AttrSpec{Name: "upload_data", Type: cty.String, Required: false},
|
|
|
|
"upload_dir_dst": &hcldec.AttrSpec{Name: "upload_dir_dst", Type: cty.String, Required: false},
|
|
|
|
"upload_dir_src": &hcldec.AttrSpec{Name: "upload_dir_src", Type: cty.String, Required: false},
|
|
|
|
"upload_dir_exclude": &hcldec.AttrSpec{Name: "upload_dir_exclude", Type: cty.List(cty.String), Required: false},
|
|
|
|
"download_dir_dst": &hcldec.AttrSpec{Name: "download_dir_dst", Type: cty.String, Required: false},
|
|
|
|
"download_dir_src": &hcldec.AttrSpec{Name: "download_dir_src", Type: cty.String, Required: false},
|
|
|
|
"download_dir_exclude": &hcldec.AttrSpec{Name: "download_dir_exclude", Type: cty.List(cty.String), Required: false},
|
|
|
|
"download_called": &hcldec.AttrSpec{Name: "download_called", Type: cty.Bool, Required: false},
|
|
|
|
"download_path": &hcldec.AttrSpec{Name: "download_path", Type: cty.String, Required: false},
|
|
|
|
"download_data": &hcldec.AttrSpec{Name: "download_data", Type: cty.String, Required: false},
|
|
|
|
}
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// FlatMockPostProcessor is an auto-generated flat version of MockPostProcessor.
|
|
|
|
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
type FlatMockPostProcessor struct {
|
HCL2: generate hcl tags with go-cty tags too (#9306)
This will allow to generate the config files:
```go
package main
import (
"fmt"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hclwrite"
"github.com/hashicorp/packer/builder/alicloud/ecs"
)
func main() {
name := "name"
app := ecs.FlatConfig{
AlicloudImageName: &name,
ECSSystemDiskMapping: &ecs.FlatAlicloudDiskDevice{
DiskName: &name,
},
}
f := hclwrite.NewEmptyFile()
block := gohcl.EncodeAsBlock(&app, `source "something" "something"`)
f.Body().AppendBlock(block)
fmt.Printf("%s", f.Bytes())
}
```
Will output:
```
source "something" "something" {
packer_user_variables = null
packer_sensitive_variables = null
image_name = "name"
image_share_account = null
image_unshare_account = null
image_copy_regions = null
image_copy_names = null
tags = null
tag = null
system_disk_mapping = { disk_category = null, disk_delete_with_instance = null, disk_descri
ption = null, disk_device = null, disk_encrypted = null, disk_name = "name", disk_size = null, disk_
snapshot_id = null }
image_disk_mappings = null
ssh_remote_tunnels = null
ssh_local_tunnels = null
ssh_public_key = null
ssh_private_key = null
}
```
This is a good first step for #9015 and #9282
fix #9304
2020-05-28 05:19:00 -04:00
|
|
|
ArtifactId *string `cty:"artifact_id" hcl:"artifact_id"`
|
|
|
|
Keep *bool `cty:"keep" hcl:"keep"`
|
|
|
|
ForceOverride *bool `cty:"force_override" hcl:"force_override"`
|
|
|
|
Error error `cty:"error" hcl:"error"`
|
|
|
|
ConfigureCalled *bool `cty:"configure_called" hcl:"configure_called"`
|
|
|
|
ConfigureConfigs []interface{} `cty:"configure_configs" hcl:"configure_configs"`
|
|
|
|
ConfigureError error `cty:"configure_error" hcl:"configure_error"`
|
|
|
|
PostProcessCalled *bool `cty:"post_process_called" hcl:"post_process_called"`
|
|
|
|
PostProcessArtifact Artifact `cty:"post_process_artifact" hcl:"post_process_artifact"`
|
|
|
|
PostProcessUi Ui `cty:"post_process_ui" hcl:"post_process_ui"`
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// FlatMapstructure returns a new FlatMockPostProcessor.
|
|
|
|
// FlatMockPostProcessor is an auto-generated flat version of MockPostProcessor.
|
|
|
|
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
func (*MockPostProcessor) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
|
|
|
|
return new(FlatMockPostProcessor)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HCL2Spec returns the hcl spec of a MockPostProcessor.
|
|
|
|
// This spec is used by HCL to read the fields of MockPostProcessor.
|
|
|
|
// The decoded values from this spec will then be applied to a FlatMockPostProcessor.
|
|
|
|
func (*FlatMockPostProcessor) HCL2Spec() map[string]hcldec.Spec {
|
|
|
|
s := map[string]hcldec.Spec{
|
|
|
|
"artifact_id": &hcldec.AttrSpec{Name: "artifact_id", Type: cty.String, Required: false},
|
|
|
|
"keep": &hcldec.AttrSpec{Name: "keep", Type: cty.Bool, Required: false},
|
|
|
|
"force_override": &hcldec.AttrSpec{Name: "force_override", Type: cty.Bool, Required: false},
|
|
|
|
"error": &hcldec.AttrSpec{Name: "error", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
|
|
|
"configure_called": &hcldec.AttrSpec{Name: "configure_called", Type: cty.Bool, Required: false},
|
|
|
|
"configure_configs": &hcldec.AttrSpec{Name: "configure_configs", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
2020-01-07 05:44:22 -05:00
|
|
|
"configure_error": &hcldec.AttrSpec{Name: "configure_error", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
2019-12-17 05:25:56 -05:00
|
|
|
"post_process_called": &hcldec.AttrSpec{Name: "post_process_called", Type: cty.Bool, Required: false},
|
2020-01-07 05:44:22 -05:00
|
|
|
"post_process_artifact": &hcldec.AttrSpec{Name: "post_process_artifact", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
|
|
|
"post_process_ui": &hcldec.AttrSpec{Name: "post_process_ui", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// FlatMockProvisioner is an auto-generated flat version of MockProvisioner.
|
|
|
|
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
type FlatMockProvisioner struct {
|
HCL2: generate hcl tags with go-cty tags too (#9306)
This will allow to generate the config files:
```go
package main
import (
"fmt"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hclwrite"
"github.com/hashicorp/packer/builder/alicloud/ecs"
)
func main() {
name := "name"
app := ecs.FlatConfig{
AlicloudImageName: &name,
ECSSystemDiskMapping: &ecs.FlatAlicloudDiskDevice{
DiskName: &name,
},
}
f := hclwrite.NewEmptyFile()
block := gohcl.EncodeAsBlock(&app, `source "something" "something"`)
f.Body().AppendBlock(block)
fmt.Printf("%s", f.Bytes())
}
```
Will output:
```
source "something" "something" {
packer_user_variables = null
packer_sensitive_variables = null
image_name = "name"
image_share_account = null
image_unshare_account = null
image_copy_regions = null
image_copy_names = null
tags = null
tag = null
system_disk_mapping = { disk_category = null, disk_delete_with_instance = null, disk_descri
ption = null, disk_device = null, disk_encrypted = null, disk_name = "name", disk_size = null, disk_
snapshot_id = null }
image_disk_mappings = null
ssh_remote_tunnels = null
ssh_local_tunnels = null
ssh_public_key = null
ssh_private_key = null
}
```
This is a good first step for #9015 and #9282
fix #9304
2020-05-28 05:19:00 -04:00
|
|
|
PrepCalled *bool `cty:"prep_called" hcl:"prep_called"`
|
|
|
|
PrepConfigs []interface{} `cty:"prep_configs" hcl:"prep_configs"`
|
|
|
|
ProvCalled *bool `cty:"prov_called" hcl:"prov_called"`
|
|
|
|
ProvRetried *bool `cty:"prov_retried" hcl:"prov_retried"`
|
|
|
|
ProvCommunicator Communicator `cty:"prov_communicator" hcl:"prov_communicator"`
|
|
|
|
ProvUi Ui `cty:"prov_ui" hcl:"prov_ui"`
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// FlatMapstructure returns a new FlatMockProvisioner.
|
|
|
|
// FlatMockProvisioner is an auto-generated flat version of MockProvisioner.
|
|
|
|
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
func (*MockProvisioner) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
|
|
|
|
return new(FlatMockProvisioner)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HCL2Spec returns the hcl spec of a MockProvisioner.
|
|
|
|
// This spec is used by HCL to read the fields of MockProvisioner.
|
|
|
|
// The decoded values from this spec will then be applied to a FlatMockProvisioner.
|
|
|
|
func (*FlatMockProvisioner) HCL2Spec() map[string]hcldec.Spec {
|
|
|
|
s := map[string]hcldec.Spec{
|
|
|
|
"prep_called": &hcldec.AttrSpec{Name: "prep_called", Type: cty.Bool, Required: false},
|
|
|
|
"prep_configs": &hcldec.AttrSpec{Name: "prep_configs", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
|
|
|
"prov_called": &hcldec.AttrSpec{Name: "prov_called", Type: cty.Bool, Required: false},
|
2020-04-16 05:58:54 -04:00
|
|
|
"prov_retried": &hcldec.AttrSpec{Name: "prov_retried", Type: cty.Bool, Required: false},
|
2020-01-07 05:44:22 -05:00
|
|
|
"prov_communicator": &hcldec.AttrSpec{Name: "prov_communicator", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
|
|
|
"prov_ui": &hcldec.AttrSpec{Name: "prov_ui", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
|
|
|
// FlatRemoteCmd is an auto-generated flat version of RemoteCmd.
|
|
|
|
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
type FlatRemoteCmd struct {
|
HCL2: generate hcl tags with go-cty tags too (#9306)
This will allow to generate the config files:
```go
package main
import (
"fmt"
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hclwrite"
"github.com/hashicorp/packer/builder/alicloud/ecs"
)
func main() {
name := "name"
app := ecs.FlatConfig{
AlicloudImageName: &name,
ECSSystemDiskMapping: &ecs.FlatAlicloudDiskDevice{
DiskName: &name,
},
}
f := hclwrite.NewEmptyFile()
block := gohcl.EncodeAsBlock(&app, `source "something" "something"`)
f.Body().AppendBlock(block)
fmt.Printf("%s", f.Bytes())
}
```
Will output:
```
source "something" "something" {
packer_user_variables = null
packer_sensitive_variables = null
image_name = "name"
image_share_account = null
image_unshare_account = null
image_copy_regions = null
image_copy_names = null
tags = null
tag = null
system_disk_mapping = { disk_category = null, disk_delete_with_instance = null, disk_descri
ption = null, disk_device = null, disk_encrypted = null, disk_name = "name", disk_size = null, disk_
snapshot_id = null }
image_disk_mappings = null
ssh_remote_tunnels = null
ssh_local_tunnels = null
ssh_public_key = null
ssh_private_key = null
}
```
This is a good first step for #9015 and #9282
fix #9304
2020-05-28 05:19:00 -04:00
|
|
|
Command *string `cty:"command" hcl:"command"`
|
|
|
|
Stdin io.Reader `cty:"stdin" hcl:"stdin"`
|
|
|
|
Stdout io.Writer `cty:"stdout" hcl:"stdout"`
|
|
|
|
Stderr io.Writer `cty:"stderr" hcl:"stderr"`
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// FlatMapstructure returns a new FlatRemoteCmd.
|
|
|
|
// FlatRemoteCmd is an auto-generated flat version of RemoteCmd.
|
|
|
|
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
func (*RemoteCmd) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
|
|
|
|
return new(FlatRemoteCmd)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HCL2Spec returns the hcl spec of a RemoteCmd.
|
|
|
|
// This spec is used by HCL to read the fields of RemoteCmd.
|
|
|
|
// The decoded values from this spec will then be applied to a FlatRemoteCmd.
|
|
|
|
func (*FlatRemoteCmd) HCL2Spec() map[string]hcldec.Spec {
|
|
|
|
s := map[string]hcldec.Spec{
|
|
|
|
"command": &hcldec.AttrSpec{Name: "command", Type: cty.String, Required: false},
|
2020-01-07 05:44:22 -05:00
|
|
|
"stdin": &hcldec.AttrSpec{Name: "stdin", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
|
|
|
"stdout": &hcldec.AttrSpec{Name: "stdout", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
|
|
|
"stderr": &hcldec.AttrSpec{Name: "stderr", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
return s
|
|
|
|
}
|