Documentation ¶
Overview ¶
provides a custom error interface and exit codes to use on the elemental-cli
Index ¶
Constants ¶
const AlreadyInstalled = 57
Device already contains an install
const CalculateChecksum = 70
Error calculating checksum
const Cleanup = 41
Error occurred during cleanup
const CloseFile = 10
Error closing a file
const CloudInitRunStage = 65
Error encountered during cloud-init run-stage
const CommandRun = 11
Error running a command
const CopyData = 12
Error copying data
const CopyFile = 13
Error copying a file
const CopyFileImg = 77
Error occurred while copying the filesystem image and setting new labels
const CosignWrongFlags = 14
Wrong cosign flags used in cmd
const CreateDir = 15
Error creating a dir
const CreateFile = 16
Error creating a file
const CreateImgFromTree = 76
Error occurred while creating the OS filesystem image
const CreateTempDir = 17
Error creating a temporal dir
const DeactivatingDevices = 55
Error deactivating active devices
const DeployImage = 48
Error deploying image to file
const DeployImgTree = 75
Error occurred while preparing the image root tree
const DownloadFile = 53
Error during file download
const DumpSource = 18
Error dumping the source
const FormatPartitions = 60
Error occurred when formatting partitions
const GzipWriter = 19
Error creating a gzip writer
const HookAfterInstall = 51
Error during after-install hook
const HookAfterInstallChroot = 52
Error during after-install-chroot hook
const HookAfterReset = 63
Error during after-reset hook
const HookAfterResetChroot = 62
Error during after-reset-chroot hook
const HookAfterUpgrade = 38
Error during after-upgrade hook
const HookAfterUpgradeChroot = 39
Error during after-upgrade-chroot hook
const HookBeforeInstall = 50
Error during before-install hook
const HookBeforeReset = 61
Error during before-reset hook
const HookBeforeUpgrade = 36
Error during before-upgrade hook
const HookBeforeUpgradeChroot = 37
Error during before-upgrade-chroot hook
const HookPostInstall = 74
Error occurred during post-install hook
const HookPostReset = 73
Error occurred during post-reset hook
const HookPostUpgrade = 72
Error occurred during post-upgrade hook
const IdentifySource = 20
Error trying to identify the source
const InstallGrub = 49
Error installing GRUB
const InvalidTarget = 47
Error invalid device specified
const LabelImage = 44
Error occurred when labeling partition
const MKFSCall = 21
Error calling mkfs
const MountPartitions = 54
Error mounting partitions
const MountRecoveryPartition = 35
Error mounting recovery partition
const MountStatePartition = 34
Error mounting state partition
const MoveFile = 40
Error moving file
const NoPackagesForArch = 22
There is not packages for the given architecture
const NoReposConfigured = 23
No luet repositories configured
const NoSourceProvided = 68
No source was provided for the command
const OpenFile = 24
Error opening a file
const OutFileExists = 25
Output file already exists
const PartitioningDevice = 56
Error during device partitioning
const PowerOff = 43
Error occurred trying to shutdown
const ReadFile = 67
Error reading file
const ReadingBuildConfig = 26
Error reading the build config
const ReadingBuildDiskConfig = 27
Error reading the build-disk config
const ReadingInstallUpgradeFlags = 32
Error reading the install/upgrade flags
const ReadingRunConfig = 31
Error reading the run config
const ReadingSpecConfig = 33
Error reading the config for the command
const Reboot = 42
Error occurred trying to reboot
const RemoveFile = 69
Error removing a file
const RequiresRoot = 58
Command requires root privileges
const SelinuxRelabel = 46
Error occurred during selinux relabeling
const SetDefaultGrubEntry = 45
Error setting default grub entry
const SetGrubVariables = 78
Error setting persistent GRUB variables
const StatFile = 28
Error running stat on a file
const TarHeader = 29
Error creating a tar archive
const TruncateFile = 30
Error truncating a file
const Unknown int = 255
Unknown error
const UnmountImage = 71
Error occurred when unmounting image
const UnmountPartitions = 59
Error occurred when unmounting partitions
const UnpackImage = 66
Error unpacking image
const UnsupportedFlavor = 64
Unsupported flavor
Variables ¶
This section is empty.
Functions ¶
func NewFromError ¶
NewFromError generates an ElementalError from an existing error, maintaining its error message
Types ¶
type ElementalError ¶
type ElementalError struct {
// contains filtered or unexported fields
}
ElementalError is our custom error to pass around exit codes in the error
func (*ElementalError) Error ¶
func (e *ElementalError) Error() string
func (*ElementalError) ExitCode ¶
func (e *ElementalError) ExitCode() int