Documentation
¶
Index ¶
- type DownloadCompleteMsg
- type DownloadStartedMsg
- type ImportCompleteMsg
- type ImportModel
- func (m *ImportModel) Init() tea.Cmd
- func (m *ImportModel) IsFinished() bool
- func (m *ImportModel) SetFilePath(filePath string)
- func (m *ImportModel) SetWidth(width int)
- func (m *ImportModel) StartImport() tea.Cmd
- func (m *ImportModel) Update(msg tea.Msg) (*ImportModel, tea.Cmd)
- func (m *ImportModel) View() string
- type ImportModelConfig
- type ImportStartedMsg
- type MainModel
- type StateImportAppConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadCompleteMsg ¶
DownloadCompleteMsg indicates that downloading has completed.
type DownloadStartedMsg ¶
type DownloadStartedMsg struct{}
DownloadStartedMsg indicates that downloading has started.
type ImportCompleteMsg ¶
type ImportCompleteMsg struct {
Result *stateio.ImportResult
Err error
}
ImportCompleteMsg indicates that importing has completed.
type ImportModel ¶
type ImportModel struct {
// contains filtered or unexported fields
}
ImportModel handles the import progress display.
func NewImportModel ¶
func NewImportModel(config ImportModelConfig) *ImportModel
NewImportModel creates a new import model.
func (*ImportModel) Init ¶
func (m *ImportModel) Init() tea.Cmd
func (*ImportModel) IsFinished ¶
func (m *ImportModel) IsFinished() bool
IsFinished returns whether the import has finished.
func (*ImportModel) SetFilePath ¶
func (m *ImportModel) SetFilePath(filePath string)
SetFilePath sets the file path for the import.
func (*ImportModel) SetWidth ¶
func (m *ImportModel) SetWidth(width int)
SetWidth sets the terminal width for the import model.
func (*ImportModel) StartImport ¶
func (m *ImportModel) StartImport() tea.Cmd
StartImport returns a command to start the import process.
func (*ImportModel) Update ¶
func (m *ImportModel) Update(msg tea.Msg) (*ImportModel, tea.Cmd)
func (*ImportModel) View ¶
func (m *ImportModel) View() string
type ImportModelConfig ¶
type ImportModelConfig struct {
EngineConfig *stateio.EngineConfig
FilePath string
Styles *stylespkg.Styles
Headless bool
HeadlessWriter io.Writer
JSONMode bool
}
ImportModelConfig holds configuration for the import model.
type ImportStartedMsg ¶
type ImportStartedMsg struct{}
ImportStartedMsg indicates that importing has started.
type MainModel ¶
type MainModel struct {
Error error
// contains filtered or unexported fields
}
MainModel is the top-level model for the state import command TUI.
func NewStateImportApp ¶
func NewStateImportApp(config StateImportAppConfig) (*MainModel, error)
NewStateImportApp creates a new state import application.