Versions in this module Expand all Collapse all v2 v2.1.0 Apr 5, 2024 v2.1.0-dev Mar 8, 2024 v2.0.0 Mar 8, 2024 Changes in this version + const BIOS + const EFI + const GPT + const MSDOS + func DebugLevel() log.Level + func IsDebugLevel(l Logger) bool + type Bootloader interface + DoEFIEntries func(shimName, efiDir string) error + Install func(rootDir, bootDir string) (err error) + InstallConfig func(rootDir, bootDir string) error + InstallEFI func(rootDir, efiDir string) error + InstallEFIBinaries func(rootDir, efiDir, efiPath string) error + SetDefaultEntry func(partMountPoint, imgMountPoint, defaultEntry string) error + SetPersistentVariables func(envFile string, vars map[string]string) error + type BtrfsConfig struct + func NewBtrfsConfig() *BtrfsConfig + type BuildConfig struct + Date bool + Name string + OutDir string + Snapshotter SnapshotterConfig + func (b *BuildConfig) Sanitize() error + type CloudInitRunner interface + CloudInitFileRender func(target string, config *schema.YipConfig) error + Run func(string, ...string) error + SetModifier func(schema.Modifier) + type Config struct + Arch string + Client HTTPClient + CloudInitPaths []string + CloudInitRunner CloudInitRunner + Cosign bool + CosignPubKey string + Fs FS + ImageExtractor ImageExtractor + LocalImage bool + Logger Logger + Mounter Mounter + Platform *Platform + Runner Runner + SquashFsCompressionConfig []string + SquashFsNoCompression bool + Strict bool + Syscall SyscallInterface + Verify bool + func (c *Config) Sanitize() error + func (c Config) LoadInstallState() (*InstallState, error) + func (c Config) WriteInstallState(i *InstallState, statePath, recoveryPath string) error + type DiskSpec struct + CloudInit []string + DeployCmd []string + Expandable bool + GrubConf string + GrubDefEntry string + Partitions ElementalPartitions + RecoverySystem Image + Size uint + System *ImageSource + Type string + func (d *DiskSpec) MinDiskSize() uint + func (d *DiskSpec) Sanitize() error + func (d DiskSpec) GetGrubLabels() map[string]string + type ElementalPartitions struct + BIOS *Partition + EFI *Partition + OEM *Partition + Persistent *Partition + Recovery *Partition + State *Partition + func NewElementalPartitionsFromList(pl PartitionList, state *InstallState) ElementalPartitions + func (ep *ElementalPartitions) SetFirmwarePartitions(firmware string, partTable string) error + func (ep ElementalPartitions) GetConfigStorage() string + func (ep ElementalPartitions) PartitionsByInstallOrder(extraPartitions PartitionList, excludes ...*Partition) PartitionList + func (ep ElementalPartitions) PartitionsByMountPoint(descending bool, excludes ...*Partition) PartitionList + type EphemeralMounts struct + Device string + Paths []string + Size string + Type string + type FS interface + Chmod func(name string, mode fs.FileMode) error + Create func(name string) (*os.File, error) + Glob func(pattern string) ([]string, error) + Link func(oldname, newname string) error + Lstat func(name string) (fs.FileInfo, error) + Mkdir func(name string, perm fs.FileMode) error + Open func(name string) (fs.File, error) + OpenFile func(name string, flag int, perm fs.FileMode) (*os.File, error) + RawPath func(name string) (string, error) + ReadDir func(dirname string) ([]fs.DirEntry, error) + ReadFile func(filename string) ([]byte, error) + Readlink func(name string) (string, error) + Remove func(name string) error + RemoveAll func(name string) error + Rename func(oldpath, newpath string) error + Stat func(name string) (fs.FileInfo, error) + Symlink func(oldname, newname string) error + WriteFile func(filename string, data []byte, perm fs.FileMode) error + type HTTPClient interface + GetURL func(log Logger, url string, destination string) error + type Image struct + FS string + File string + Label string + LoopDevice string + MountPoint string + Size uint + Source *ImageSource + type ImageExtractor interface + ExtractImage func(imageRef, destination, platformRef string, local bool) (string, error) + type ImageSource struct + func NewDirSrc(src string) *ImageSource + func NewDockerSrc(src string) *ImageSource + func NewEmptySrc() *ImageSource + func NewFileSrc(src string) *ImageSource + func NewSrcFromURI(uri string) (*ImageSource, error) + func (i *ImageSource) CustomUnmarshal(data interface{}) (bool, error) + func (i *ImageSource) SetDigest(digest string) + func (i *ImageSource) UnmarshalYAML(value *yaml.Node) error + func (i ImageSource) GetDigest() string + func (i ImageSource) IsDir() bool + func (i ImageSource) IsEmpty() bool + func (i ImageSource) IsFile() bool + func (i ImageSource) IsImage() bool + func (i ImageSource) MarshalYAML() (interface{}, error) + func (i ImageSource) String() string + func (i ImageSource) Value() string + type InitSpec struct + Features []string + Force bool + Mkinitrd bool + type InstallSpec struct + CloudInit []string + DisableBootEntry bool + ExtraPartitions PartitionList + Firmware string + Force bool + GrubDefEntry string + Iso string + NoFormat bool + PartTable string + Partitions ElementalPartitions + RecoverySystem Image + System *ImageSource + Target string + func (i *InstallSpec) Sanitize() error + func (i InstallSpec) GetGrubLabels() map[string]string + type InstallState struct + Date string + Partitions map[string]*PartitionState + Snapshotter SnapshotterConfig + type LiveISO struct + BootloaderInRootFs bool + Firmware string + GrubEntry string + Image []*ImageSource + Label string + RootFS []*ImageSource + UEFI []*ImageSource + func (i *LiveISO) Sanitize() error + type Logger interface + Ask func() bool + Debug func(...interface{}) + Debugf func(string, ...interface{}) + Error func(...interface{}) + Errorf func(string, ...interface{}) + Fatal func(...interface{}) + Fatalf func(string, ...interface{}) + GetLevel func() log.Level + Info func(...interface{}) + Infof func(string, ...interface{}) + Panic func(...interface{}) + Panicf func(string, ...interface{}) + Screen func(string) + SetContext func(string) + SetFormatter func(formatter log.Formatter) + SetLevel func(level log.Level) + SetOutput func(writer io.Writer) + Spinner func() + SpinnerStop func() + Success func(...interface{}) + Trace func(...interface{}) + Tracef func(string, ...interface{}) + Warn func(...interface{}) + Warnf func(string, ...interface{}) + Warning func(...interface{}) + func NewBufferLogger(b *bytes.Buffer) Logger + func NewLogger() Logger + func NewNullLogger() Logger + type LoggerOptions func(l Logger) error + type LoopDeviceConfig struct + FS string + Size uint + func NewLoopDeviceConfig() *LoopDeviceConfig + type MountSpec struct + Disable bool + Ephemeral EphemeralMounts + Mode string + Persistent PersistentMounts + Sysroot string + Volumes []*VolumeMount + WriteFstab bool + func (spec *MountSpec) HasPersistent() bool + func (spec *MountSpec) Sanitize() error + type Mounter interface + IsLikelyNotMountPoint func(file string) (bool, error) + Mount func(source string, target string, fstype string, options []string) error + Unmount func(target string) error + func NewDummyMounter() Mounter + func NewMounter(binary string) Mounter + type OCIImageExtractor struct + func (e OCIImageExtractor) ExtractImage(imageRef, destination, platformRef string, local bool) (string, error) + type Partition struct + Disk string + FS string + FilesystemLabel string + Flags []string + MountPoint string + Name string + Path string + Size uint + func (p Partition) ToImage() *Image + type PartitionList []*Partition + func (pl PartitionList) GetByLabel(label string) *Partition + func (pl PartitionList) GetByName(name string) *Partition + func (pl PartitionList) GetByNameOrLabel(name, label string) *Partition + type PartitionState struct + FSLabel string + RecoveryImage *SystemState + Snapshots map[int]*SystemState + type PersistentMounts struct + Mode string + Paths []string + Volume VolumeMount + type Platform struct + Arch string + GolangArch string + OS string + func NewPlatform(os, arch string) (*Platform, error) + func NewPlatformFromArch(arch string) (*Platform, error) + func ParsePlatform(platform string) (*Platform, error) + func (p *Platform) CustomUnmarshal(data interface{}) (bool, error) + func (p *Platform) String() string + func (p *Platform) UnmarshalYAML(value *yaml.Node) error + func (p Platform) MarshalYAML() (interface{}, error) + type RealRunner struct + Logger Logger + func (r *RealRunner) SetLogger(logger Logger) + func (r RealRunner) CommandExists(command string) bool + func (r RealRunner) GetLogger() Logger + func (r RealRunner) InitCmd(command string, args ...string) *exec.Cmd + func (r RealRunner) Run(command string, args ...string) ([]byte, error) + func (r RealRunner) RunCmd(cmd *exec.Cmd) ([]byte, error) + type RealSyscall struct + func (r *RealSyscall) Chdir(path string) error + func (r *RealSyscall) Chroot(path string) error + type Repository struct + Arch string + Name string + Priority int + ReferenceID string + Type string + URI string + type ResetSpec struct + CloudInit []string + DisableBootEntry bool + Efi bool + FormatOEM bool + FormatPersistent bool + GrubDefEntry string + Partitions ElementalPartitions + State *InstallState + System *ImageSource + Target string + func (r *ResetSpec) Sanitize() error + func (r ResetSpec) GetGrubLabels() map[string]string + type RunConfig struct + EjectCD bool + PowerOff bool + Reboot bool + Snapshotter SnapshotterConfig + func (r *RunConfig) Sanitize() error + type Runner interface + CommandExists func(command string) bool + GetLogger func() Logger + InitCmd func(string, ...string) *exec.Cmd + Run func(string, ...string) ([]byte, error) + RunCmd func(cmd *exec.Cmd) ([]byte, error) + SetLogger func(logger Logger) + type Snapshot struct + ID int + InProgress bool + Label string + MountPoint string + Path string + WorkDir string + type Snapshotter interface + CloseTransaction func(snap *Snapshot) error + CloseTransactionOnError func(snap *Snapshot) error + DeleteSnapshot func(id int) error + GetSnapshots func() ([]int, error) + InitSnapshotter func(state *Partition, efiDir string) error + SnapshotToImageSource func(snap *Snapshot) (*ImageSource, error) + StartTransaction func() (*Snapshot, error) + type SnapshotterConfig struct + Config interface{} + MaxSnaps int + Type string + func NewBtrfs() SnapshotterConfig + func NewLoopDevice() SnapshotterConfig + func (c *SnapshotterConfig) CustomUnmarshal(data interface{}) (bool, error) + func (c *SnapshotterConfig) UnmarshalYAML(node *yaml.Node) error + type SourceNotFound struct + func (s *SourceNotFound) Error() string + type SyscallInterface interface + Chdir func(string) error + Chroot func(string) error + type SystemState struct + Active bool + Digest string + FS string + Label string + Source *ImageSource + type UpgradeSpec struct + BootloaderUpgrade bool + GrubDefEntry string + Partitions ElementalPartitions + RecoverySystem Image + RecoveryUpgrade bool + State *InstallState + System *ImageSource + func (u *UpgradeSpec) Sanitize() error + func (u *UpgradeSpec) SanitizeForRecoveryOnly() error + func (u UpgradeSpec) GetGrubLabels() map[string]string + type VolumeMount struct + Device string + FSType string + Mountpoint string + Options []string Other modules containing this package github.com/rancher/elemental-toolkit