config

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChrootMount

type ChrootMount struct {
	MountType       string `mapstructure:"mount_type"`
	SourcePath      string `mapstructure:"source_path"`
	DestinationPath string `mapstructure:"destination_path"`
}

ChrootMount describes a mountpoint that is being setup as part of the chroot environment

func (*ChrootMount) FlatMapstructure

func (*ChrootMount) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatChrootMount. FlatChrootMount is an auto-generated flat version of ChrootMount. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

type FlatChrootMount

type FlatChrootMount struct {
	MountType       *string `mapstructure:"mount_type" cty:"mount_type" hcl:"mount_type"`
	SourcePath      *string `mapstructure:"source_path" cty:"source_path" hcl:"source_path"`
	DestinationPath *string `mapstructure:"destination_path" cty:"destination_path" hcl:"destination_path"`
}

FlatChrootMount is an auto-generated flat version of ChrootMount. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatChrootMount) HCL2Spec

func (*FlatChrootMount) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a ChrootMount. This spec is used by HCL to read the fields of ChrootMount. The decoded values from this spec will then be applied to a FlatChrootMount.

type FlatPartition

type FlatPartition struct {
	Index                 *int     `mapstructure:"int" cty:"int" hcl:"int"`
	Name                  *string  `mapstructure:"name" cty:"name" hcl:"name"`
	Type                  *string  `mapstructure:"type" cty:"type" hcl:"type"`
	Size                  *string  `mapstructure:"size" cty:"size" hcl:"size"`
	StartSector           *int     `mapstructure:"start_sector" cty:"start_sector" hcl:"start_sector"`
	Filesystem            *string  `mapstructure:"filesystem" cty:"filesystem" hcl:"filesystem"`
	FilesystemMakeOptions []string `mapstructure:"filesystem_make_options" cty:"filesystem_make_options" hcl:"filesystem_make_options"`
	Mountpoint            *string  `mapstructure:"mountpoint" cty:"mountpoint" hcl:"mountpoint"`
}

FlatPartition is an auto-generated flat version of Partition. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatPartition) HCL2Spec

func (*FlatPartition) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a Partition. This spec is used by HCL to read the fields of Partition. The decoded values from this spec will then be applied to a FlatPartition.

type FlatQemuConfig

type FlatQemuConfig struct {
	QemuBinarySourcePath      *string `mapstructure:"qemu_binary_source_path" required:"true" cty:"qemu_binary_source_path" hcl:"qemu_binary_source_path"`
	QemuBinaryDestinationPath *string `mapstructure:"qemu_binary_destination_path" cty:"qemu_binary_destination_path" hcl:"qemu_binary_destination_path"`
}

FlatQemuConfig is an auto-generated flat version of QemuConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatQemuConfig) HCL2Spec

func (*FlatQemuConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a QemuConfig. This spec is used by HCL to read the fields of QemuConfig. The decoded values from this spec will then be applied to a FlatQemuConfig.

type FlatRemoteFileConfig

type FlatRemoteFileConfig struct {
	FileChecksum     *string  `mapstructure:"file_checksum" required:"true" cty:"file_checksum" hcl:"file_checksum"`
	FileChecksumURL  *string  `mapstructure:"file_checksum_url" cty:"file_checksum_url" hcl:"file_checksum_url"`
	FileChecksumType *string  `mapstructure:"file_checksum_type" cty:"file_checksum_type" hcl:"file_checksum_type"`
	FileUrls         []string `mapstructure:"file_urls" cty:"file_urls" hcl:"file_urls"`
	FileUnarchiveCmd []string `mapstructure:"file_unarchive_cmd" cty:"file_unarchive_cmd" hcl:"file_unarchive_cmd"`
	TargetPath       *string  `mapstructure:"file_target_path" cty:"file_target_path" hcl:"file_target_path"`
	TargetExtension  *string  `mapstructure:"file_target_extension" cty:"file_target_extension" hcl:"file_target_extension"`
	TmpDirLocation   *string  `mapstructure:"file_tmp_dir_location" cty:"file_tmp_dir_location" hcl:"file_tmp_dir_location"`
}

FlatRemoteFileConfig is an auto-generated flat version of RemoteFileConfig. Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.

func (*FlatRemoteFileConfig) HCL2Spec

func (*FlatRemoteFileConfig) HCL2Spec() map[string]hcldec.Spec

HCL2Spec returns the hcl spec of a RemoteFileConfig. This spec is used by HCL to read the fields of RemoteFileConfig. The decoded values from this spec will then be applied to a FlatRemoteFileConfig.

type ImageConfig

type ImageConfig struct {
	ImagePath              string        `mapstructure:"image_path" required:"true"`
	ImageSize              string        `mapstructure:"image_size"`
	ImageType              string        `mapstructure:"image_type"`
	ImageMountPath         string        `mapstructure:"image_mount_path"`
	ImageBuildMethod       string        `mapstructure:"image_build_method"`
	ImageSizeBytes         uint64        `mapstructure:"image_size_bytes"`
	ImagePartitions        []Partition   `mapstructure:"image_partitions"`
	ImageChrootMounts      []ChrootMount `mapstructure:"image_chroot_mounts"`
	AdditionalChrootMounts []ChrootMount `mapstructure:"additional_chroot_mounts"`
	ImageSetupExtra        [][]string    `mapstructure:"image_setup_extra"`
	ImageChrootEnv         []string      `mapstructure:"image_chroot_env"`
}

ImageConfig describes the raw image properties

func (*ImageConfig) Prepare

func (c *ImageConfig) Prepare(_ *interpolate.Context) (warnings []string, errs []error)

Prepare image configuration

type Partition

type Partition struct {
	Index                 int      `mapstructure:"int"`
	Name                  string   `mapstructure:"name"`
	Type                  string   `mapstructure:"type"`
	Size                  string   `mapstructure:"size"`
	StartSector           int      `mapstructure:"start_sector"`
	Filesystem            string   `mapstructure:"filesystem"`
	FilesystemMakeOptions []string `mapstructure:"filesystem_make_options"`
	Mountpoint            string   `mapstructure:"mountpoint"`
}

Partition describes a single partition that is going to be created on raw image

func (*Partition) FlatMapstructure

func (*Partition) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatPartition. FlatPartition is an auto-generated flat version of Partition. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

type QemuConfig

type QemuConfig struct {
	QemuBinarySourcePath      string `mapstructure:"qemu_binary_source_path" required:"true"`
	QemuBinaryDestinationPath string `mapstructure:"qemu_binary_destination_path"`
}

QemuConfig describes qemu configuration

func (*QemuConfig) FlatMapstructure

func (*QemuConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatQemuConfig. FlatQemuConfig is an auto-generated flat version of QemuConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

func (*QemuConfig) Prepare

func (q *QemuConfig) Prepare(_ *interpolate.Context) (warnings []string, errs []error)

Prepare qemu configuration

type RemoteFileConfig

type RemoteFileConfig struct {
	FileChecksum     string   `mapstructure:"file_checksum" required:"true"`
	FileChecksumURL  string   `mapstructure:"file_checksum_url"`
	FileChecksumType string   `mapstructure:"file_checksum_type"`
	FileUrls         []string `mapstructure:"file_urls"`
	FileUnarchiveCmd []string `mapstructure:"file_unarchive_cmd"`
	TargetPath       string   `mapstructure:"file_target_path"`
	TargetExtension  string   `mapstructure:"file_target_extension"`
	TmpDirLocation   string   `mapstructure:"file_tmp_dir_location"`
}

RemoteFileConfig describes remote file(s) used to build the image. Internally go-getter is being used to fetch files, so you can refer to:

https://godoc.org/github.com/hashicorp/go-getter

func (*RemoteFileConfig) FlatMapstructure

func (*RemoteFileConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec }

FlatMapstructure returns a new FlatRemoteFileConfig. FlatRemoteFileConfig is an auto-generated flat version of RemoteFileConfig. Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.

func (*RemoteFileConfig) Prepare

func (c *RemoteFileConfig) Prepare(_ *interpolate.Context) (warnings []string, errs []error)

Prepare remote file config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL