keygen

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeys

func GenerateKeys(host string) tea.Cmd

GenerateKeys is a Bubble Tea command that generates a pair of SSH keys and writes them to disk.

func NewProgram added in v0.8.5

func NewProgram(host string, fancy bool) *tea.Program

NewProgram creates a new keygen TUI program

Types

type DoneMsg

type DoneMsg struct{}

DoneMsg is sent when the keygen has completely finished running.

type FailedMsg added in v0.9.0

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

FailedMsg is a Bubble Tea message for keygen failure

func (FailedMsg) Error added in v0.9.0

func (f FailedMsg) Error() string

Error returns the underlying error

type Model

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

Model is the Bubble Tea model which stores the state of the keygen.

func NewModel

func NewModel() Model

NewModel returns a new keygen model in its initial state.

func (Model) Init added in v0.8.5

func (m Model) Init() tea.Cmd

Init is the Bubble Tea initialization function for the keygen.

func (Model) Update added in v0.8.5

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

Update is the Bubble Tea update loop for the keygen.

func (Model) View added in v0.8.5

func (m Model) View() string

View renders the view from the keygen model.

type Status added in v0.9.0

type Status int

Status represents a keygen state

const (
	StatusRunning Status = iota
	StatusError
	StatusSuccess
	StatusDone
	StatusQuitting
)

General states

type SuccessMsg added in v0.9.0

type SuccessMsg struct{}

SuccessMsg is a Bubble Tea message for keygen success

Jump to

Keyboard shortcuts

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