Documentation
¶
Index ¶
- Variables
- func GenResourceInteractive() error
- func GenViewInteractive() error
- func InferType(fieldName string) string
- func IsValidGoIdentifier(name string) (bool, string)
- func NewAppInteractive() error
- func ParseFieldInput(input string) (name, typ string)
- func RenderHelp(sections []HelpSection, width int) string
- func RenderHelpOverlay(background string, helpSections []HelpSection, termWidth, termHeight int) string
- type HelpItem
- type HelpSection
- type ValidationResult
Constants ¶
This section is empty.
Variables ¶
var ( // Styles TitleStyle = lipgloss.NewStyle(). Bold(true). Foreground(primaryColor). MarginTop(1). MarginBottom(1) SubtitleStyle = lipgloss.NewStyle(). Foreground(subtleColor). MarginBottom(1) PromptStyle = lipgloss.NewStyle(). Foreground(primaryColor). Bold(true) InputStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("15")) SuccessStyle = lipgloss.NewStyle(). Foreground(successColor). Bold(true) ErrorStyle = lipgloss.NewStyle(). Foreground(errorColor). Bold(true) HintStyle = lipgloss.NewStyle(). Foreground(subtleColor). Italic(true) HelpStyle = lipgloss.NewStyle(). Foreground(subtleColor). MarginTop(1) HighlightStyle = lipgloss.NewStyle(). Foreground(highlightColor). Bold(true) FieldLabelStyle = lipgloss.NewStyle(). Foreground(primaryColor) FieldValueStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("15")) ListItemStyle = lipgloss.NewStyle(). PaddingLeft(2) SelectedItemStyle = lipgloss.NewStyle(). Foreground(highlightColor). Bold(true). PaddingLeft(1) BoxStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(primaryColor). Padding(1, 2) ConfirmBoxStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(successColor). Padding(1, 2) // Validation styles WarningStyle = lipgloss.NewStyle(). Foreground(warningColor). Bold(true) ValidationOkStyle = lipgloss.NewStyle(). Foreground(successColor) // Help overlay styles HelpTitleStyle = lipgloss.NewStyle(). Foreground(primaryColor). Bold(true). Underline(true). Align(lipgloss.Center) HelpSectionStyle = lipgloss.NewStyle(). Foreground(highlightColor). Bold(true). MarginTop(1) HelpKeyStyle = lipgloss.NewStyle(). Foreground(primaryColor). Bold(true). Width(16) HelpDescStyle = lipgloss.NewStyle(). Foreground(lipgloss.Color("252")) OverlayStyle = lipgloss.NewStyle(). Border(lipgloss.RoundedBorder()). BorderForeground(primaryColor). BorderBackground(lipgloss.Color("235")). Background(lipgloss.Color("235")). Padding(2, 3). Align(lipgloss.Center) )
Functions ¶
func GenResourceInteractive ¶
func GenResourceInteractive() error
func GenViewInteractive ¶
func GenViewInteractive() error
func InferType ¶
InferType suggests a type based on the field name Uses common naming patterns to intelligently guess the most appropriate type
func IsValidGoIdentifier ¶
IsValidGoIdentifier validates if a string is a valid Go identifier
func NewAppInteractive ¶
func NewAppInteractive() error
func ParseFieldInput ¶
ParseFieldInput parses user input which can be either: "fieldname" -> uses inferred type "fieldname:type" -> uses specified type
func RenderHelp ¶
func RenderHelp(sections []HelpSection, width int) string
RenderHelp renders a help overlay with the given sections
func RenderHelpOverlay ¶
func RenderHelpOverlay(background string, helpSections []HelpSection, termWidth, termHeight int) string
RenderHelpOverlay renders the help overlay on top of the current screen
Types ¶
type HelpSection ¶
HelpSection represents a group of help items
func GetGenResourceHelp ¶
func GetGenResourceHelp() []HelpSection
GetGenResourceHelp returns help content for the resource generator wizard
func GetGenViewHelp ¶
func GetGenViewHelp() []HelpSection
GetGenViewHelp returns help content for the view generator wizard
func GetNewAppHelp ¶
func GetNewAppHelp() []HelpSection
GetNewAppHelp returns help content for the new app wizard
type ValidationResult ¶
ValidationResult represents the result of input validation
func IsValidAppName ¶
func IsValidAppName(name string) ValidationResult
IsValidAppName validates app name
func IsValidFieldName ¶
func IsValidFieldName(name string) ValidationResult
IsValidFieldName validates field name (lowercase, snake_case allowed)
func IsValidModulePath ¶
func IsValidModulePath(path string) ValidationResult
IsValidModulePath validates Go module path
func IsValidResourceName ¶
func IsValidResourceName(name string) ValidationResult
IsValidResourceName validates resource name (should be plural, lowercase)
func IsValidViewName ¶
func IsValidViewName(name string) ValidationResult
IsValidViewName validates view name