schema

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bhojpur

type Bhojpur struct {
	Repositories Repositories `yaml:"repositories"`
}

type BhojpurRepository

type BhojpurRepository struct {
	Name     string   `yaml:"name"`
	Enable   bool     `yaml:"enable"`
	Urls     []string `yaml:"urls"`
	Type     string   `yaml:"type"`
	Priority int      `yaml:"priority"`
}

func NewDockerRepo

func NewDockerRepo(name, url string) *BhojpurRepository

func NewHTTPRepo

func NewHTTPRepo(name, url string) *BhojpurRepository

func NewLocalRepo

func NewLocalRepo(name, path string) *BhojpurRepository

type Initramfs

type Initramfs struct {
	KernelFile string `yaml:"kernel_file"`
	RootfsFile string `yaml:"rootfs_file"`
}

type Overlay

type Overlay struct {
	Rootfs   string `yaml:"rootfs"`
	IsoImage string `yaml:"isoimage"`
	UEFI     string `yaml:"uefi"`
}

Overlay represent additional folders to overlay on top of the rootfs, isoimage, or UEFI partition

type Packages

type Packages struct {
	KeepBhojpurDB bool     `yaml:"keep_bhojpur_db"`
	Rootfs        []string `yaml:"rootfs"`
	Initramfs     []string `yaml:"initramfs"`
	IsoImage      []string `yaml:"isoimage"`
	UEFI          []string `yaml:"uefi"`
}

type Repositories

type Repositories []*BhojpurRepository

func (Repositories) Marshal

func (r Repositories) Marshal() (string, error)

type Repository

type Repository struct {
	Initramfs []string `yaml:"initramfs"`
	Packages  []string `yaml:"packages"`
}

type SquashfsOptions

type SquashfsOptions struct {
	Compression        string `yaml:"compression"`
	CompressionOptions string `yaml:"compression_options"`
	Label              string `yaml:"label"`
}

type SystemSpec

type SystemSpec struct {
	Initramfs       Initramfs       `yaml:"initramfs"`
	Label           string          `yaml:"label"`
	Packages        Packages        `yaml:"packages"`
	Bhojpur         Bhojpur         `yaml:"bhojpur"`
	Repository      Repository      `yaml:"repository"`
	Overlay         Overlay         `yaml:"overlay"`
	ImagePrefix     string          `yaml:"image_prefix"`
	Date            bool            `yaml:"image_date"`
	ImageName       string          `yaml:"image_name"`
	Arch            string          `yaml:"arch"`
	UEFIImage       string          `yaml:"uefi_img"`
	RootfsImage     string          `yaml:"rootfs_image"`
	SquashfsOptions SquashfsOptions `yaml:"squashfs_options"`

	BootFile     string `yaml:"boot_file"`
	BootCatalog  string `yaml:"boot_catalog"`
	IsoHybridMBR string `yaml:"isohybrid_mbr"`

	EnsureCommonDirs bool `yaml:"ensure_common_dirs"`
}

func LoadFromFile

func LoadFromFile(s string, fs vfs.FS) (*SystemSpec, error)

LoadFromFile loads a yip config from a YAML file

func LoadFromYaml

func LoadFromYaml(b []byte) (*SystemSpec, error)

LoadFromYaml loads a config from bytes

func (*SystemSpec) ISOName

func (s *SystemSpec) ISOName() (imageName string)

Jump to

Keyboard shortcuts

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