config

package
v0.0.0-...-7c0940c Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package config provides the TOML based configuration format used for the main .spin files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateSectionLiveOS

func ValidateSectionLiveOS(l *SectionLiveOS) error

ValidateSectionLiveOS will determine if the configuration is valid for a LiveOS

Types

type ImageConfiguration

type ImageConfiguration struct {
	Image    SectionImage    `toml:"image"`
	Branding SectionBranding `toml:"branding"`
	LiveOS   SectionLiveOS   `toml:"liveos"`
	Isolinux SectionIsolinux `toml:"isolinux"`
}

ImageConfiguration is the configuration for an image build

func New

func New(cpath string) (*ImageConfiguration, error)

New will return a new ImageConfiguration for the given path and attempt to parse it. This function will return a nil ImageConfiguration if parsing fails.

type ImageType

type ImageType string

ImageType is the type of image that will be created

const (
	// ImageTypeLiveOS is an ISO type image that may also be USB compatible
	ImageTypeLiveOS ImageType = "liveos"
)

type LoaderType

type LoaderType string

A LoaderType is a pseudo enum type for the bootloader to restrict to supported implementations

const (
	// LoaderTypeSyslinux refers to syslinux + isolinux
	LoaderTypeSyslinux LoaderType = "syslinux"
)

type SectionBranding

type SectionBranding struct {
	Title       string `toml:"title"`        // Title of the OS to use in bootloaders
	StartString string `toml:"start_string"` // main launcher entry, i.e. "Start Blahblah"
}

SectionBranding describes the image branding rules

type SectionImage

type SectionImage struct {
	Packages string    `toml:"packages"` // Path to the packages file
	Type     ImageType `toml:"type"`     // Type of image to construct
}

SectionImage describes the image portion of a spin file

type SectionIsolinux

type SectionIsolinux struct {
}

SectionIsolinux describes the [isolinux] portion of a spin file

type SectionLiveOS

type SectionLiveOS struct {
	Compression  disk.CompressionType `toml:"compression"`   // The type of compression to use on the LiveOS
	FileName     string               `toml:"filename"`      // The resulting filename for this image spin
	RootfsSize   int                  `toml:"rootfs_size"`   // Size of the image in megabytes (default 4000)
	RootfsFormat string               `toml:"rootfs_format"` // Format of the rootfs, defaults to ext4

	Label string `toml:"label"` // Label to give the resulting ISO

	BootDir string `toml:"bootdir"` // Where to store boot assets, i.e. boot/

	Bootloaders []LoaderType `toml:"bootloaders"` // Which bootloaders to enable
}

SectionLiveOS is the Live ISO specific configuration

Jump to

Keyboard shortcuts

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