platform

package
v0.252.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BootMode added in v0.40.2

type BootMode uint64
const (
	BOOT_NONE BootMode = iota
	BOOT_LEGACY
	BOOT_UEFI
	BOOT_HYBRID
)

func (BootMode) String added in v0.40.2

func (m BootMode) String() string

type Bootloader added in v0.40.2

type Bootloader int
const (
	BOOTLOADER_NONE Bootloader = iota
	BOOTLOADER_GRUB2
	BOOTLOADER_ZIPL
	BOOTLOADER_UKI
)

func FromString added in v0.40.2

func FromString(b string) (Bootloader, error)

func (*Bootloader) UnmarshalJSON added in v0.40.2

func (b *Bootloader) UnmarshalJSON(data []byte) (err error)

func (*Bootloader) UnmarshalYAML added in v0.40.2

func (b *Bootloader) UnmarshalYAML(unmarshal func(any) error) error

type Data added in v0.178.0

type Data struct {
	Arch                   arch.Arch   `yaml:"arch"`
	ImageFormat            ImageFormat `yaml:"image_format"`
	QCOW2Compat            string      `yaml:"qcow2_compat"`
	BIOSPlatform           string      `yaml:"bios_platform"`
	UEFIVendor             string      `yaml:"uefi_vendor"`
	ExtraUEFIArchitectures []string    `yaml:"extra_uefi_architectures"`
	ZiplSupport            bool        `yaml:"zipl_support"`
	// packages are index by an arbitrary string key to
	// make them YAML mergable, a good key is e.g. "bios"
	// to indicate that these packages are needed for
	// bios support
	Packages      map[string][]string `yaml:"packages"`
	BuildPackages map[string][]string `yaml:"build_packages"`
	BootFiles     [][2]string         `yaml:"boot_files"`

	Bootloader Bootloader `yaml:"bootloader"`
	FIPSMenu   bool       `yaml:"fips_menu"` // Add FIPS entry to iso bootloader menu
}

Data is a platform configured from YAML inputs that implements the "Platform" interface

func (*Data) GetArch added in v0.178.0

func (d *Data) GetArch() arch.Arch

func (*Data) GetBIOSPlatform added in v0.178.0

func (d *Data) GetBIOSPlatform() string

func (*Data) GetBootFiles added in v0.178.0

func (d *Data) GetBootFiles() [][2]string

func (*Data) GetBootloader added in v0.178.0

func (d *Data) GetBootloader() Bootloader

func (*Data) GetBuildPackages added in v0.178.0

func (d *Data) GetBuildPackages() []string

func (*Data) GetExtraUEFIArchitectures added in v0.249.0

func (d *Data) GetExtraUEFIArchitectures() []string

func (*Data) GetFIPSMenu added in v0.178.0

func (d *Data) GetFIPSMenu() bool

GetFIPSMenu is used to add the FIPS entry to the iso bootloader menu

func (*Data) GetImageFormat added in v0.178.0

func (d *Data) GetImageFormat() ImageFormat

func (*Data) GetPackages added in v0.178.0

func (d *Data) GetPackages() []string

func (*Data) GetQCOW2Compat added in v0.178.0

func (d *Data) GetQCOW2Compat() string

func (*Data) GetUEFIVendor added in v0.178.0

func (d *Data) GetUEFIVendor() string

func (*Data) GetZiplSupport added in v0.178.0

func (d *Data) GetZiplSupport() bool

type ImageFormat

type ImageFormat uint64
const (
	FORMAT_UNSET ImageFormat = iota
	FORMAT_RAW
	FORMAT_ISO
	FORMAT_QCOW2
	FORMAT_VMDK
	FORMAT_VHD
	FORMAT_GCE
	FORMAT_OVA
	FORMAT_VAGRANT_LIBVIRT
	FORMAT_VAGRANT_VIRTUALBOX
)

func (ImageFormat) String

func (f ImageFormat) String() string

func (*ImageFormat) UnmarshalJSON added in v0.40.2

func (f *ImageFormat) UnmarshalJSON(data []byte) error

func (*ImageFormat) UnmarshalYAML added in v0.40.2

func (f *ImageFormat) UnmarshalYAML(unmarshal func(any) error) error

type Platform

type Platform interface {
	GetArch() arch.Arch
	GetImageFormat() ImageFormat
	GetQCOW2Compat() string
	GetBIOSPlatform() string
	GetUEFIVendor() string
	GetExtraUEFIArchitectures() []string
	GetZiplSupport() bool
	GetPackages() []string
	GetBuildPackages() []string
	GetBootFiles() [][2]string
	GetBootloader() Bootloader
	GetFIPSMenu() bool
}

Jump to

Keyboard shortcuts

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