ui

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	// Keys stores the keys.
	Keys []*models.Key
	// AgentClient store the SSH agent client.
	AgentClient agent.ExtendedAgent
	// AgentKeys stores the public keys loaded to SSH agent.
	AgentKeys [][]byte
	// contains filtered or unexported fields
}

func NewModel

func NewModel() (*Model, error)

NewModel is an initializer which creates a new model for rendering our Bubbletea app.

func (*Model) Init

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

Init is called to kick off the render cycle. It allows you to perform IO after the app has loaded and rendered once, asynchronously. The tea.Cmd can return a tea.Msg which will be passed into Update() in order to update the model's state.

func (*Model) Update

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

Update is called with a tea.Msg, representing something that happened within our application.

This can be things like terminal resizing, keypresses, or custom IO.

func (*Model) View

func (m *Model) View() string

View renders output to the CLI.

Jump to

Keyboard shortcuts

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