component

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OpenBrowser

func OpenBrowser(url string, onComplete tea.Msg, onErr tea.Msg) tea.Cmd

TODO: handle errors by passing in a better error message

Types

type GenerateRunbookDoneMsg

type GenerateRunbookDoneMsg struct {
	GeneratedRunbook *client.GeneratedRunbook
	Err              error
}

type GenerateRunbookModel

type GenerateRunbookModel struct {
	fetch.Model
	// contains filtered or unexported fields
}

func NewGenerateRunbookModel

func NewGenerateRunbookModel(
	commands []string,
	cl client.Client,
) GenerateRunbookModel

func (*GenerateRunbookModel) Generate

func (m *GenerateRunbookModel) Generate() tea.Msg

func (GenerateRunbookModel) Init

func (m GenerateRunbookModel) Init() tea.Cmd

func (*GenerateRunbookModel) IsDone added in v0.4.0

func (m *GenerateRunbookModel) IsDone() bool

func (GenerateRunbookModel) RunbookCh

func (m GenerateRunbookModel) RunbookCh() chan *Runbook

func (GenerateRunbookModel) Update

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

func (GenerateRunbookModel) View

func (m GenerateRunbookModel) View() string

type ListItem

type ListItem struct {
	Command         string
	DescriptionText string
}

func (ListItem) Description

func (i ListItem) Description() string

func (ListItem) FilterValue

func (i ListItem) FilterValue() string

func (ListItem) Title

func (i ListItem) Title() string

type ListModel

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

func NewListModel

func NewListModel(items []ListItem, title string, url string) ListModel

func (ListModel) Init

func (m ListModel) Init() tea.Cmd

func (ListModel) Update

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

func (ListModel) View

func (m ListModel) View() string

type NopMsg

type NopMsg struct{}

type Runbook

type Runbook struct {
	Title string
	Steps []RunbookStep
	URL   string
}

type RunbookStep

type RunbookStep struct {
	Command     string
	Description string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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