tui

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	All = iota
	Analyze
	CreateIndex
	Vacuum
	Cluster
	BaseBackup
	Copy
)

Variables

View Source
var (
	UpdateInterval    time.Duration
	AfterCompletion   time.Duration
	RightMargin       int = 10
	MinimumTableWidth int = 120
	MaxVerticalRows   int = 15
)

Functions

func NewProgram

func NewProgram(m Model, fullScreen bool) *tea.Program

Types

type Model

type Model struct {
	DB *sql.DB

	CreateIndex bool
	Vacuum      bool
	Analyze     bool
	Cluster     bool
	BaseBackup  bool
	Copy        bool
	// contains filtered or unexported fields
}

func NewModel

func NewModel(db *sql.DB) Model

func Targets added in v0.0.2

func Targets(model *Model, t int) *Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() string

type Option

type Option func(*Model) error

Jump to

Keyboard shortcuts

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