wizard

package
v0.25.5 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (Model, Handler, chan<- bool)

Types

type Handler

type Handler interface {
	Done()
	Abort(string)
	Info(string)
	SetCurrentTaskCompletedTitle(string)
	SetCurrentTaskCompletedTitleWithStatus(string, TaskStatus)
	SetInputModel(tea.Model) tea.Model
	SetTask(string, string)
	Warn(string)
	OnQuit(tea.Model, tea.Msg) tea.Msg
}

type InputCompleted

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

type Model

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

func (Model) InfoLog

func (m Model) InfoLog(message string) string

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) ReceiveUpdateMessages

func (m Model) ReceiveUpdateMessages() tea.Msg

func (Model) Update

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

func (Model) View

func (m Model) View() string

func (Model) WarnLog

func (m Model) WarnLog(message string) string

type Styles

type Styles struct {
	Bold           lipgloss.Style
	Spinner        lipgloss.Style
	InfoLogHeading lipgloss.Style
	WarnLogHeading lipgloss.Style
	InfoLogBody    lipgloss.Style
	WarnLogBody    lipgloss.Style
	Marks          TaskStatusStyle
}

func DefaultStyles

func DefaultStyles() Styles

type TaskStatus added in v0.25.3

type TaskStatus string
const (
	TaskStatusSuccess TaskStatus = "success"
	TaskStatusError   TaskStatus = "error"
	TaskStatusSkipped TaskStatus = "skipped"
)

type TaskStatusStyle added in v0.25.3

type TaskStatusStyle struct {
	Success lipgloss.Style
	Error   lipgloss.Style
	Skipped lipgloss.Style
}

func DefaultMarks added in v0.25.3

func DefaultMarks() TaskStatusStyle

func (TaskStatusStyle) Render added in v0.25.3

func (s TaskStatusStyle) Render(status TaskStatus) string

Jump to

Keyboard shortcuts

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