kernelspecs

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BootFiles

type BootFiles struct {
	Dir   string         `json:"dir,omitempty" yaml:"dir,omitempty"`
	Files []*KernelFiles `json:"files,omitempty" yaml:"files,omitempty"`

	BzImageLink string `json:"bzImage,omitempty" yaml:"bzImage,omitempty"`
	InitrdLink  string `json:"initrd,omitempty" yaml:"initrd,omitempty"`
}

func NewBootFiles

func NewBootFiles(dir string) *BootFiles

func (*BootFiles) AddInitrdImage

func (b *BootFiles) AddInitrdImage(i *InitrdImage, t *KernelType) error

func (*BootFiles) AddKernelImage

func (b *BootFiles) AddKernelImage(ki *KernelImage, t *KernelType) error

func (*BootFiles) BzImageLinkExistingKernel

func (b *BootFiles) BzImageLinkExistingKernel() bool

func (*BootFiles) GetDir

func (b *BootFiles) GetDir() string

func (*BootFiles) GetFile

func (b *BootFiles) GetFile(version, ktype string) (*KernelFiles, error)

func (*BootFiles) PurgeOrphanInitrdImages

func (b *BootFiles) PurgeOrphanInitrdImages() error

func (*BootFiles) RetrieveBzImageSelectedKernel

func (b *BootFiles) RetrieveBzImageSelectedKernel() *KernelFiles

func (*BootFiles) String

func (b *BootFiles) String() string

type InitrdImage

type InitrdImage struct {
	Filename   string `json:"filename,omitempty" yaml:"filename,omitempty"`
	Prefix     string `json:"prefix,omitempty" yaml:"prefix,omitempty"`
	Suffix     string `json:"suffix,omitempty" yaml:"suffix,omitempty"`
	KernelType string `json:"kernel_type,omitempty" yaml:"kernel_type,omitempty"`
	Arch       string `json:"arch,omitempty" yaml:"arch,omitempty"`
	Version    string `json:"version,omitempty" yaml:"version,omitempty"`
}

func NewInitrdImage

func NewInitrdImage() *InitrdImage

func NewInitrdImageFromFile

func NewInitrdImageFromFile(t *KernelType, file string) (*InitrdImage, error)

func (*InitrdImage) EqualTo

func (i *InitrdImage) EqualTo(in *InitrdImage) bool

func (*InitrdImage) GenerateFilename

func (i *InitrdImage) GenerateFilename() string

func (*InitrdImage) GetArch

func (i *InitrdImage) GetArch() string

func (*InitrdImage) GetFilename

func (i *InitrdImage) GetFilename() string

func (*InitrdImage) GetKernelType

func (i *InitrdImage) GetKernelType() string

func (*InitrdImage) GetPrefix

func (i *InitrdImage) GetPrefix() string

func (*InitrdImage) GetSuffix

func (i *InitrdImage) GetSuffix() string

func (*InitrdImage) GetVersion

func (i *InitrdImage) GetVersion() string

func (*InitrdImage) SetArch

func (i *InitrdImage) SetArch(a string)

func (*InitrdImage) SetFilename

func (i *InitrdImage) SetFilename(f string)

func (*InitrdImage) SetKernelType

func (i *InitrdImage) SetKernelType(t string)

func (*InitrdImage) SetPrefix

func (i *InitrdImage) SetPrefix(p string)

func (*InitrdImage) SetSuffix

func (i *InitrdImage) SetSuffix(s string)

func (*InitrdImage) SetVersion

func (i *InitrdImage) SetVersion(v string)

func (*InitrdImage) String

func (i *InitrdImage) String() string

type KernelFiles

type KernelFiles struct {
	Kernel *KernelImage `json:"kernel,omitempty" yaml:"kernel,omitempty"`
	Initrd *InitrdImage `json:"initrd,omitempty" yaml:"initrd,omitempty"`
	Type   *KernelType  `json:"type,omitempty" yaml:"type,omitempty"`
}

func NewKernelFiles

func NewKernelFiles(t *KernelType) *KernelFiles

type KernelImage

type KernelImage struct {
	Filename string `json:"filename,omitempty" yaml:"filename,omitempty"`
	Type     string `json:"type,omitempty" yaml:"type,omitempty"`
	Prefix   string `json:"prefix,omitempty" yaml:"prefix,omitempty"`
	Suffix   string `json:"suffix,omitempty" yaml:"suffix,omitempty"`
	Version  string `json:"version,omitempty" yaml:"version,omitempty"`
	Arch     string `json:"arch,omitempty" yaml:"arch,omitempty"`
}

func NewKernelImage

func NewKernelImage() *KernelImage

func NewKernelImageFromFile

func NewKernelImageFromFile(t *KernelType, file string) (*KernelImage, error)

func (*KernelImage) EqualTo

func (k *KernelImage) EqualTo(i *KernelImage) bool

func (*KernelImage) GenerateFilename

func (k *KernelImage) GenerateFilename() string

func (*KernelImage) GetArch

func (k *KernelImage) GetArch() string

func (*KernelImage) GetFilename

func (k *KernelImage) GetFilename() string

func (*KernelImage) GetPrefix

func (k *KernelImage) GetPrefix() string

func (*KernelImage) GetSuffix

func (k *KernelImage) GetSuffix() string

func (*KernelImage) GetType

func (k *KernelImage) GetType() string

func (*KernelImage) GetVersion

func (k *KernelImage) GetVersion() string

func (*KernelImage) SetArch

func (k *KernelImage) SetArch(v string)

func (*KernelImage) SetFilename

func (k *KernelImage) SetFilename(f string)

func (*KernelImage) SetPrefix

func (k *KernelImage) SetPrefix(p string)

func (*KernelImage) SetSuffix

func (k *KernelImage) SetSuffix(s string)

func (*KernelImage) SetType

func (k *KernelImage) SetType(t string)

func (*KernelImage) SetVersion

func (k *KernelImage) SetVersion(v string)

func (*KernelImage) String

func (k *KernelImage) String() string

type KernelType

type KernelType struct {
	Name         string `json:"name,omitempty" yaml:"name,omitempty"`
	KernelPrefix string `json:"kernel_prefix,omitempty" yaml:"kernel_prefix,omitempty"`
	InitrdPrefix string `json:"initrd_prefix,omitempty" yaml:"initrd_prefix,omitempty"`
	Suffix       string `json:"suffix,omitempty" yaml:"suffix,omitempty"`
	Type         string `json:"type,omitempty" yaml:"type,omitempty"`
	WithArch     bool   `json:"with_arch,omitempty" yaml:"with_arch,omitempty"`

	Regex *regexp.Regexp `json:"-" yaml:"-"`
}

func KernelTypeFromYaml added in v0.2.1

func KernelTypeFromYaml(data []byte) (*KernelType, error)

func (*KernelType) GetInitrdPrefix

func (t *KernelType) GetInitrdPrefix() string

func (*KernelType) GetInitrdPrefixSanitized

func (t *KernelType) GetInitrdPrefixSanitized() string

func (*KernelType) GetKernelPrefix

func (t *KernelType) GetKernelPrefix() string

func (*KernelType) GetKernelPrefixSanitized

func (t *KernelType) GetKernelPrefixSanitized() string

func (*KernelType) GetName added in v0.2.1

func (t *KernelType) GetName() string

func (*KernelType) GetRegex

func (t *KernelType) GetRegex() *regexp.Regexp

func (*KernelType) GetSuffix

func (t *KernelType) GetSuffix() string

func (*KernelType) GetType

func (t *KernelType) GetType() string

func (*KernelType) IsInitrdFile

func (t *KernelType) IsInitrdFile(f string) (bool, error)

func (*KernelType) IsKernelFile

func (t *KernelType) IsKernelFile(f string) (bool, error)

func (*KernelType) SetInitrdPrefix

func (t *KernelType) SetInitrdPrefix(p string)

func (*KernelType) SetKernelPrefix

func (t *KernelType) SetKernelPrefix(p string)

func (*KernelType) SetSuffix

func (t *KernelType) SetSuffix(s string)

func (*KernelType) SetType

func (t *KernelType) SetType(s string)

Jump to

Keyboard shortcuts

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