Documentation
¶
Index ¶
- func RunSearch(initialQuery string, searchFunc SearchFunc, addFunc AddFunc) error
- type AddFunc
- type AddResultMsg
- type AddRunnerModel
- type AddRunnerResult
- type AddRunnerStep
- type AddToolchainResult
- type CreationMsg
- type CreationResultMsg
- type DockerImage
- type ImageCheckProgress
- type ImageCheckResult
- type ImagesLoadedMsg
- type Model
- type ProjectConfig
- type Question
- type SearchFunc
- type SearchModel
- type SearchResult
- type SearchResultsMsg
- type SearchState
- type Step
- type ToolchainModel
- type ToolchainStep
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddResultMsg ¶
AddResultMsg contains add result
type AddRunnerModel ¶
type AddRunnerModel struct {
// contains filtered or unexported fields
}
func NewAddRunnerModel ¶
func NewAddRunnerModel(existingNames []string) AddRunnerModel
func (AddRunnerModel) GetResult ¶
func (m AddRunnerModel) GetResult() *AddRunnerResult
func (AddRunnerModel) Init ¶
func (m AddRunnerModel) Init() tea.Cmd
func (AddRunnerModel) View ¶
func (m AddRunnerModel) View() string
type AddRunnerResult ¶
func RunAddRunnerTUI ¶
func RunAddRunnerTUI(existingNames []string) (*AddRunnerResult, error)
type AddRunnerStep ¶
type AddRunnerStep int
const ( RunnerStepName AddRunnerStep = iota RunnerStepType RunnerStepDockerImage RunnerStepCheckingImage RunnerStepSSHHost RunnerStepSSHUser RunnerStepDone )
type AddToolchainResult ¶
type AddToolchainResult struct {
Name string
Runner string
BuildType string
CC string
CXX string
CMakeToolchainFile string
}
AddToolchainResult is the result of the TUI
func RunAddToolchainTUI ¶
func RunAddToolchainTUI(existingNames []string, existingRunners []string) (*AddToolchainResult, error)
type CreationResultMsg ¶
CreationResultMsg contains creation result
type DockerImage ¶
type DockerImage struct {
Repository string
Tag string
ID string
Size string
Created string
Architecture string
}
func (DockerImage) FullName ¶
func (d DockerImage) FullName() string
type ImageCheckProgress ¶
type ImageCheckProgress struct {
Phase string // "pulling", "checking"
}
type ImageCheckResult ¶
type ImagesLoadedMsg ¶
type ImagesLoadedMsg []DockerImage
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the TUI state
func (Model) GetConfig ¶
func (m Model) GetConfig() ProjectConfig
GetConfig returns the final configuration
func (Model) IsCancelled ¶
IsCancelled returns true if the user canceled
type ProjectConfig ¶
type ProjectConfig struct {
Name string
IsLibrary bool
CppStandard int
TestFramework string
Benchmark string
ClangFormat string
PackageManager string // "vcpkg", "meson", "bazel", or "none"
VCS string // "git" or "none"
UseHooks bool
GitHooks []string
PreCommit []string
PrePush []string
// Template fields
UseTemplate bool // True if using a template
TemplateName string // Selected template name
}
ProjectConfig holds the user's choices
type SearchFunc ¶
type SearchFunc func(query string) ([]SearchResult, error)
SearchFunc is a function that searches for packages
type SearchModel ¶
type SearchModel struct {
// contains filtered or unexported fields
}
SearchModel represents the search TUI state
func NewSearchModel ¶
func NewSearchModel(initialQuery string, searchFunc SearchFunc, addFunc AddFunc) SearchModel
NewSearchModel creates a new search model
type SearchResult ¶
type SearchResultsMsg ¶
type SearchResultsMsg struct {
Results []SearchResult
Err error
}
SearchResultsMsg contains search results
type SearchState ¶
type SearchState int
SearchState represents the current state of the search UI
const ( SearchStateInput SearchState = iota SearchStateSearching SearchStateResults SearchStateAdding SearchStateDone )
type ToolchainModel ¶
type ToolchainModel struct {
// contains filtered or unexported fields
}
ToolchainModel represents the TUI state for adding a CI target
func NewToolchainModel ¶
func NewToolchainModel(existingNames []string, existingRunners []string) ToolchainModel
NewToolchainModel creates a new model for adding a CI target
func (ToolchainModel) GetResult ¶
func (m ToolchainModel) GetResult() *AddToolchainResult
func (ToolchainModel) Init ¶
func (m ToolchainModel) Init() tea.Cmd
func (ToolchainModel) IsCancelled ¶
func (m ToolchainModel) IsCancelled() bool
func (ToolchainModel) View ¶
func (m ToolchainModel) View() string
type ToolchainStep ¶
type ToolchainStep int
ToolchainStep represents the current step in the target creation flow
const ( ToolchainStepName ToolchainStep = iota ToolchainStepRunner ToolchainStepCompilerCC ToolchainStepCompilerCXX ToolchainStepCMakeToolchain ToolchainStepBuildType ToolchainStepDone )