presenters

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasChildrenGuidance

func HasChildrenGuidance(vmID string, s *styles.KillStyles) string

HasChildrenGuidance returns a friendly guidance message for recursive delete.

func NoDataFound

func NoDataFound(message string, s *styles.KillStyles)

func OperationCancelled

func OperationCancelled(s *styles.KillStyles)

func PrintDeletionSummary

func PrintDeletionSummary(results SummaryResults, s *styles.KillStyles)

func ProgressCounter

func ProgressCounter(current, total int, action, target string, s *styles.KillStyles)

func RenderBranch

func RenderBranch(a *app.App, res BranchView)

func RenderBuild

func RenderBuild(a *app.App, v BuildView)

func RenderConnect

func RenderConnect(a *app.App, v ConnectView)

func RenderCopy

func RenderCopy(a *app.App, v CopyView)

func RenderExecute

func RenderExecute(a *app.App, v ExecuteView)

func RenderPause

func RenderPause(a *app.App, v PauseView)

func RenderResume

func RenderResume(a *app.App, v ResumeView)

func RenderRun

func RenderRun(a *app.App, v RunView)

func RenderRunCommit

func RenderRunCommit(a *app.App, v RunCommitView)

func RenderStatus

func RenderStatus(a *app.App, res StatusView)

RenderStatus renders the result of HandleStatus using existing status presenters.

func RenderVMList

func RenderVMList(s *styles.StatusStyles, vms []vers.Vm)

RenderVMList renders a list of all VMs

func RenderVMStatus

func RenderVMStatus(s *styles.StatusStyles, vm *vers.Vm)

func RootDeleteGuidance

func RootDeleteGuidance(vmID string, s *styles.KillStyles) string

RootDeleteGuidance returns a friendly message for attempts to delete a root VM.

func SectionHeader

func SectionHeader(title string, s *styles.KillStyles)

func SuccessMessage

func SuccessMessage(message string, s *styles.KillStyles)

Types

type BranchView

type BranchView struct {
	FromID       string
	FromName     string
	NewID        string
	NewAlias     string
	NewState     string
	CheckoutDone bool
	CheckoutErr  error
	UsedHEAD     bool
}

type BuildView

type BuildView struct {
	RootfsName string
	Skipped    bool
	Reason     string
}

type ConnectView

type ConnectView struct {
	UsedHEAD   bool
	HeadID     string
	VMName     string
	SSHHost    string
	SSHPort    string
	LocalRoute bool
}

type CopyView

type CopyView struct {
	UsedHEAD bool
	HeadID   string
	VMName   string
	Action   string
	Src      string
	Dest     string
}

type ExecuteView

type ExecuteView struct {
	UsedHEAD bool
	HeadID   string
}

type PauseView

type PauseView struct{ VMName, NewState string }

type ResumeView

type ResumeView struct{ VMName, NewState string }

type RunCommitView

type RunCommitView struct{ RootVmID, HeadTarget, CommitKey string }

type RunView

type RunView struct{ RootVmID, VmAlias, HeadTarget string }

type StatusHead

type StatusHead struct {
	Show        bool
	Present     bool
	Empty       bool
	ID          string
	DisplayName string
	State       string
}

type StatusMode

type StatusMode int
const (
	StatusList StatusMode = iota
	StatusVM
)

type StatusView

type StatusView struct {
	Mode StatusMode
	Head StatusHead
	VM   *vers.Vm
	VMs  []vers.Vm
}

type SummaryResults

type SummaryResults struct {
	SuccessCount int
	FailCount    int
	Errors       []string
	ItemType     string
}

Jump to

Keyboard shortcuts

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