{"modulePath":"github.com/newstack-cloud/deploy-cli-sdk","version":"v0.10.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package stateimportui\n\n## Types\n\n```go\ntype DownloadCompleteMsg struct {\n\tData []byte\n\tErr  error\n}\n```\nDownloadCompleteMsg indicates that downloading has completed.\n\n```go\ntype DownloadStartedMsg struct{}\n```\nDownloadStartedMsg indicates that downloading has started.\n\n```go\ntype ImportCompleteMsg struct {\n\tResult *stateio.ImportResult\n\tErr    error\n}\n```\nImportCompleteMsg indicates that importing has completed.\n\n```go\ntype ImportModel struct {\n\t// contains filtered or unexported fields\n}\n```\nImportModel handles the import progress display.\n\n```go\nfunc NewImportModel(config ImportModelConfig) *ImportModel\n```\nNewImportModel creates a new import model.\n\n```go\nfunc (m *ImportModel) Init() tea.Cmd\n```\n\n```go\nfunc (m *ImportModel) IsFinished() bool\n```\nIsFinished returns whether the import has finished.\n\n```go\nfunc (m *ImportModel) SetFilePath(filePath string)\n```\nSetFilePath sets the file path for the import.\n\n```go\nfunc (m *ImportModel) SetWidth(width int)\n```\nSetWidth sets the terminal width for the import model.\n\n```go\nfunc (m *ImportModel) StartImport() tea.Cmd\n```\nStartImport returns a command to start the import process.\n\n```go\nfunc (m *ImportModel) Update(msg tea.Msg) (*ImportModel, tea.Cmd)\n```\n\n```go\nfunc (m *ImportModel) View() string\n```\n\n```go\ntype ImportModelConfig struct {\n\tEngineConfig         *stateio.EngineConfig\n\tFilePath             string\n\tStyles               *stylespkg.Styles\n\tHeadless             bool\n\tHeadlessWriter       io.Writer\n\tJSONMode             bool\n\tFileEncryption       *stateio.StateEncryptionKeyConfig\n\tRequireEncryptedFile bool\n\tForce                bool\n}\n```\nImportModelConfig holds configuration for the import model.\n\n```go\ntype ImportStartedMsg struct{}\n```\nImportStartedMsg indicates that importing has started.\n\n```go\ntype MainModel struct {\n\tError error\n\t// contains filtered or unexported fields\n}\n```\nMainModel is the top-level model for the state import command TUI.\n\n```go\nfunc NewStateImportApp(config StateImportAppConfig) (*MainModel, error)\n```\nNewStateImportApp creates a new state import application.\n\n```go\nfunc (m MainModel) Init() tea.Cmd\n```\n\n```go\nfunc (m MainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)\n```\n\n```go\nfunc (m MainModel) View() string\n```\n\n```go\ntype StateImportAppConfig struct {\n\tFilePath       string\n\tEngineConfig   *stateio.EngineConfig\n\tStyles         *stylespkg.Styles\n\tHeadless       bool\n\tHeadlessWriter io.Writer\n\tJSONMode       bool\n\t// FileEncryption is the key to decrypt the input file with when it is encrypted.\n\tFileEncryption *stateio.StateEncryptionKeyConfig\n\t// RequireEncryptedFile refuses an input file that is not encrypted, see\n\t// stateio.ImportParams.\n\tRequireEncryptedFile bool\n\t// Force allows importing over instances that have an operation in progress.\n\tForce bool\n}\n```\nStateImportAppConfig holds configuration for creating a new state import app.\n\n","path":"github.com/newstack-cloud/deploy-cli-sdk/tui/stateimportui","name":"stateimportui","synopsis":"","isRedistributable":true}
