stateimportui

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadCompleteMsg

type DownloadCompleteMsg struct {
	Data []byte
	Err  error
}

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.

func (MainModel) Init

func (m MainModel) Init() tea.Cmd

func (MainModel) Update

func (m MainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (MainModel) View

func (m MainModel) View() string

type StateImportAppConfig

type StateImportAppConfig struct {
	FilePath       string
	EngineConfig   *stateio.EngineConfig
	Styles         *stylespkg.Styles
	Headless       bool
	HeadlessWriter io.Writer
	JSONMode       bool
}

StateImportAppConfig holds configuration for creating a new state import app.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL