Documentation
¶
Overview ¶
Package tui provides interactive terminal UI components for spec.
Index ¶
- Variables
- func ConfirmPreset(preset PresetOption) (bool, error)
- func IsInteractive() bool
- func PrintError(message string)
- func PrintSuccess(message string)
- func PrintTitle(title string)
- func PromptAddAnotherGate() (bool, error)
- func PromptConfirm(title string) (bool, error)
- func PromptExpression() (string, string, error)
- func PromptGateType() (string, error)
- func PromptMultiSelectStages(stages []string, title, description string) ([]string, error)
- func PromptSectionSlug() (string, error)
- func PromptSelectStage(stages []string, title, description string) (string, error)
- func PromptStageIcon() (string, error)
- func PromptStageName(existing []string) (string, error)
- func PromptStageOwner(defaultOwner string) (string, error)
- func PromptStagePosition(stages []string) (afterStage string, err error)
- func SelectPreset(presets []PresetOption) (string, error)
- type GateType
- type PresetOption
- type StageInput
Constants ¶
This section is empty.
Variables ¶
var CommonGateTypes = []GateType{
{Name: "Section has content", Description: "Require a section to be non-empty", Value: "section_not_empty"},
{Name: "PR stack exists", Description: "Require PR stack plan in §7.3", Value: "pr_stack_exists"},
{Name: "PRs approved", Description: "All PRs must be approved", Value: "prs_approved"},
{Name: "Decisions resolved", Description: "All decisions must be resolved", Value: "decisions_resolved"},
{Name: "Custom expression", Description: "Write a custom expression", Value: "expr"},
{Name: "No gate", Description: "Skip adding a gate", Value: "none"},
}
CommonGateTypes are the built-in gate types.
var CommonRoles = []string{"anyone", "author", "pm", "tl", "designer", "engineer", "qa", "security"}
Common roles
var StageIcons = []string{"📥", "📝", "👀", "🎨", "🔧", "🏗️", "👁️", "✅", "🚀", "📊", "🎉", "📦", "🔒", "💬", "📋", "○"}
Common icons for stages
Functions ¶
func ConfirmPreset ¶
func ConfirmPreset(preset PresetOption) (bool, error)
ConfirmPreset shows a preset preview and asks for confirmation.
func PromptAddAnotherGate ¶
PromptAddAnotherGate asks if the user wants to add another gate.
func PromptConfirm ¶
PromptConfirm asks for yes/no confirmation.
func PromptExpression ¶
PromptExpression prompts for a custom expression.
func PromptGateType ¶
PromptGateType prompts the user to select a gate type.
func PromptMultiSelectStages ¶
PromptMultiSelectStages prompts to select multiple stages.
func PromptSectionSlug ¶
PromptSectionSlug prompts for a section slug.
func PromptSelectStage ¶
PromptSelectStage prompts to select a stage from a list.
func PromptStageIcon ¶
PromptStageIcon prompts for a stage icon.
func PromptStageName ¶
PromptStageName prompts for a stage name.
func PromptStageOwner ¶
PromptStageOwner prompts for a stage owner role.
func PromptStagePosition ¶
PromptStagePosition prompts for where to insert a new stage.
func SelectPreset ¶
func SelectPreset(presets []PresetOption) (string, error)
SelectPreset prompts the user to select a pipeline preset.
Types ¶
type PresetOption ¶
PresetOption represents a pipeline preset for selection.