Documentation
¶
Index ¶
- Constants
- Variables
- func ForceReset()
- func IsEnabled() bool
- func PasswordError(msg string)
- func PasswordErrorWithRetry(msg string) (string, error)
- func PasswordPromptDone()
- func PromptPassword(device string) (string, error)
- func Quit()
- func ShowTPMError(message string)
- func ShowTPMLockout(message, recoveryHint string)
- func StageDone(stage string)
- func StageError(stage string, err error)
- func Start() error
- func UpdateStage(stage string)
- type Model
- type PasswordErrorMsg
- type PasswordErrorWithRetryMsg
- type PasswordPromptDoneMsg
- type PasswordPromptMsg
- type PasswordResult
- type QuitMsg
- type StageDoneMsg
- type StageErrorMsg
- type StageMsg
- type TPMErrorMsg
- type TPMLockoutMsg
Constants ¶
const ( StageConsole = "Initializing console" StageMounting = "Mounting filesystems" StageVConsole = "Configuring vconsole" StageUdev = "Starting udev" StageModules = "Loading kernel modules" StageTPM = "Loading TPM modules" StagePCRLock = "Setting up pcrlock" StageLUKS = "Unlocking encrypted devices" StageLVM = "Activating LVM volumes" StageResume = "Checking hibernate resume" StageRoot = "Mounting root filesystem" StageFsck = "Checking filesystem" StageSwitchroot = "Switching to root" )
Boot stage names
Variables ¶
var Logo string
var Program *tea.Program
Program is the global TUI program instance
var Title string
Functions ¶
func ForceReset ¶
func ForceReset()
ForceReset sends terminal reset sequences to restore TTY state. Call this after Quit() to ensure clean handover to new init. This handles edge cases where the TUI cleanup didn't fully restore the terminal.
func PasswordErrorWithRetry ¶
PasswordErrorWithRetry shows a password error and waits for retry Returns the next password attempt
func PasswordPromptDone ¶
func PasswordPromptDone()
PasswordPromptDone signals that password entry is complete Call this after successful unlock or when giving up on PIN entry
func PromptPassword ¶
PromptPassword prompts for a password via the TUI Returns the entered password or an error
func ShowTPMError ¶
func ShowTPMError(message string)
ShowTPMError displays a TPM error that prevents unlock Use for non-retryable errors like PCR mismatch
func ShowTPMLockout ¶
func ShowTPMLockout(message, recoveryHint string)
ShowTPMLockout displays a lockout message without PIN prompt Use when TPM is in DA lockout state before prompting for PIN
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the boot TUI state
type PasswordErrorMsg ¶
type PasswordErrorMsg string
type PasswordPromptDoneMsg ¶
type PasswordPromptDoneMsg struct{} // Signals password entry is complete
type PasswordPromptMsg ¶
type PasswordResult ¶
PasswordResult is the result of password input
type StageDoneMsg ¶
type StageDoneMsg string
type StageErrorMsg ¶
type TPMErrorMsg ¶
type TPMErrorMsg struct {
Message string
}