tui

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyEnter     = "enter"
	KeyCtrlC     = "ctrl+c"
	KeyQ         = "q"
	KeyUp        = "up"
	KeyDown      = "down"
	KeyShiftTab  = "shift+tab"
	KeyTab       = "tab"
	KeyEsc       = "esc"
	KeyBackspace = "backspace"
)

Variables

This section is empty.

Functions

func Start

func Start(c *client.Client, accessKey, secretKey string) error

func StartConfigure

func StartConfigure(showMessage string) (profile string, err error)

Types

type Choice

type Choice struct {
	Object        interface{}
	Display       string
	ChosenDisplay string
}

type ChooserViewport

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

func NewChooserViewport

func NewChooserViewport(
	choices []Choice,
	width int,
	height int,
) *ChooserViewport

func (*ChooserViewport) CurrentChoice

func (m *ChooserViewport) CurrentChoice() Choice

func (*ChooserViewport) Init

func (m *ChooserViewport) Init() tea.Cmd

func (*ChooserViewport) Update

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

func (*ChooserViewport) View

func (m *ChooserViewport) View() string

type ConfigureModel

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

func (*ConfigureModel) Init

func (m *ConfigureModel) Init() tea.Cmd

func (*ConfigureModel) Update

func (m *ConfigureModel) Update(msg tea.Msg) (model tea.Model, cmd tea.Cmd)

func (*ConfigureModel) View

func (m *ConfigureModel) View() string

type DriftsTab

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

func NewDriftsTab

func NewDriftsTab(c *client.Client) *DriftsTab

func (*DriftsTab) ActiveStyle

func (envs *DriftsTab) ActiveStyle() lipgloss.Style

func (*DriftsTab) Init

func (m *DriftsTab) Init() tea.Cmd

func (*DriftsTab) Key

func (envs *DriftsTab) Key() string

func (*DriftsTab) Name

func (envs *DriftsTab) Name() string

func (*DriftsTab) NormalStyle

func (envs *DriftsTab) NormalStyle() lipgloss.Style

func (*DriftsTab) Update

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

func (*DriftsTab) View

func (m *DriftsTab) View() string

type EnvsTab

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

func NewEnvsTab

func NewEnvsTab(c *client.Client) *EnvsTab

func (*EnvsTab) ActiveStyle

func (envs *EnvsTab) ActiveStyle() lipgloss.Style

func (*EnvsTab) Init

func (m *EnvsTab) Init() tea.Cmd

func (*EnvsTab) Key

func (envs *EnvsTab) Key() string

func (*EnvsTab) Name

func (envs *EnvsTab) Name() string

func (*EnvsTab) NormalStyle

func (envs *EnvsTab) NormalStyle() lipgloss.Style

func (*EnvsTab) Update

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

func (*EnvsTab) View

func (m *EnvsTab) View() string

type HomeTab

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

func NewHomeTab

func NewHomeTab(_ *client.Client) *HomeTab

func (*HomeTab) ActiveStyle

func (m *HomeTab) ActiveStyle() lipgloss.Style

func (*HomeTab) Init

func (m *HomeTab) Init() tea.Cmd

func (*HomeTab) Key

func (m *HomeTab) Key() string

func (*HomeTab) Name

func (m *HomeTab) Name() string

func (*HomeTab) NormalStyle

func (m *HomeTab) NormalStyle() lipgloss.Style

func (*HomeTab) Update

func (m *HomeTab) Update(msg tea.Msg) (model tea.Model, cmd tea.Cmd)

func (*HomeTab) View

func (m *HomeTab) View() string

type Model

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

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Update

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

func (*Model) View

func (m *Model) View() string

type SignInModel

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

func NewSignIn

func NewSignIn(c *client.Client, accessKey, secretKey string) *SignInModel

func (*SignInModel) Init

func (m *SignInModel) Init() tea.Cmd

func (*SignInModel) Update

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

func (*SignInModel) View

func (m *SignInModel) View() string

type Tab

type Tab interface {
	tea.Model
	Key() string
	Name() string
	NormalStyle() lipgloss.Style
	ActiveStyle() lipgloss.Style
}

type Viewport

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

func NewViewport

func NewViewport(content string, width, height int) *Viewport

func (*Viewport) Init

func (m *Viewport) Init() tea.Cmd

func (*Viewport) Update

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

func (*Viewport) View

func (m *Viewport) View() string

Jump to

Keyboard shortcuts

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