Documentation
¶
Overview ¶
Package tui provides a terminal user interface for Copa using progrock.
Index ¶
- func FormatEmulationPrefix(hostArch, targetArch, targetVariant string) string
- func RenderError(info ErrorInfo) string
- func RenderNextSteps(steps NextSteps) string
- func RenderPatchSummary(summaries []PlatformSummary) string
- func RenderPatchingPlan(plan PatchingPlan) string
- type Display
- type ErrorInfo
- type NextSteps
- type PatchingPlan
- type PlatformSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatEmulationPrefix ¶
FormatEmulationPrefix formats a platform prefix showing host→target when using QEMU emulation. Returns "arm64" for native builds, or "amd64 → arm64" (unicode) / "amd64 -> arm64" (ASCII) for emulated builds.
func RenderError ¶
RenderError renders an error message with colors.
func RenderNextSteps ¶
RenderNextSteps renders next steps with colors.
func RenderPatchSummary ¶
func RenderPatchSummary(summaries []PlatformSummary) string
RenderPatchSummary renders a summary of patched platforms with colors.
func RenderPatchingPlan ¶
func RenderPatchingPlan(plan PatchingPlan) string
RenderPatchingPlan renders the patching plan with colors.
Types ¶
type Display ¶
type Display interface {
UpdateFrom(ctx context.Context, ch chan *client.SolveStatus) ([]client.VertexWarning, error)
}
Display wraps either progrock or standard progressui based on debug mode.
func NewDisplay ¶
func NewDisplay(output *os.File, debugMode bool, progress progressui.DisplayMode) (Display, error)
NewDisplay creates a new display interface. Uses progrock TUI when progress mode is auto/tty and we have a TTY. Falls back to BuildKit's progressui for explicit modes (plain, quiet, rawjson) or debug mode.
type PatchingPlan ¶
type PatchingPlan struct {
TargetPlatform string
PatchedImageName string
PreservedPlatforms []string
}
PatchingPlan represents the patching plan to display.