interactive

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package interactive implements an interactive command-line interface using the Bubble Tea framework.

Index

Constants

This section is empty.

Variables

View Source
var BorderStyle = lipgloss.NewStyle().
	BorderStyle(lipgloss.NormalBorder()).
	Padding(1, 1).
	BorderForeground(lipgloss.Color("240"))
View Source
var ColHeaderStyle = lipgloss.NewStyle().
	Foreground(lipgloss.Color("#ffffff")).
	Background(lipgloss.Color("99"))
View Source
var DocStyle = lipgloss.NewStyle().Margin(1, 2)
View Source
var ErrorTextStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("9"))
View Source
var HeadingStyle = lipgloss.NewStyle().
	Foreground(lipgloss.Color("99")).
	Bold(true).Align(lipgloss.Center)
View Source
View Source
var OuterStyle = lipgloss.NewStyle().Margin(0, 2)
View Source
var PurpleBgStyle = lipgloss.NewStyle().
	Foreground(lipgloss.Color("#ffffff")).
	Background(lipgloss.Color("#5E5ED2"))
View Source
var TableTitleStyle = PurpleBgStyle.
	Padding(0, 1).Margin(0, 2)

Functions

func InitialModel

func InitialModel() *parentModel

InitialModel is the entry point when no config file is available. It loads any persisted connections from disk and shows the login screen.

func InitialModelWithConfig

func InitialModelWithConfig(host, user, password string) *parentModel

InitialModelWithConfig is the entry point when the config file provides a single pre-loaded connection (legacy path kept for backward compatibility). The connection is attempted immediately; on failure the login screen is shown.

func NewActionModel

func NewActionModel() actionModel

func NewBackupExecModel

func NewBackupExecModel(config ServerConfig, dbName, filename string) backupExecModel

func NewBackupModel

func NewBackupModel(config ServerConfig) backupModel

func NewInspectModel

func NewInspectModel(config ServerConfig, bakFileName string) inspectModel

func NewListFilesModel

func NewListFilesModel(config ServerConfig) listFilesModel

func NewLoginModel

func NewLoginModel(connections []domain.Connection, err error) loginModel

NewLoginModel constructs a login screen. connections is the list loaded from the config file; err (if non-nil) is displayed as an error banner.

func NewRestoreExecModel

func NewRestoreExecModel(config ServerConfig, bakFileInfo domain.BackupEntry, newDBName string) restoreExecModel

func NewRestoreModel

func NewRestoreModel(config ServerConfig, fileInfo domain.BackupEntry) restoreModel

func NewSaveConnectionModel added in v0.2.3

func NewSaveConnectionModel(host, user, password string) saveConnectionModel

NewSaveConnectionModel constructs the model. The name input is pre-filled with "user@host" as a sensible default the user can edit.

func NewWelcomeModel

func NewWelcomeModel() templateModel

func RenderStatusBar

func RenderStatusBar(host string, model tea.Model) string

Types

type ServerConfig

type ServerConfig struct {
	// contains filtered or unexported fields
}

ServerConfig holds the active SQL Server connection credentials.

Jump to

Keyboard shortcuts

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