wizard

package
v0.30.3 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: Apache-2.0 Imports: 9 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 {
	Abort(string)
	Done()
	Error(string)
	Info(string)
	OnQuit(tea.Model, tea.Msg) tea.Msg
	Print(string)
	SetCurrentTaskCompleted()
	SetCurrentTaskCompletedTitle(string)
	SetCurrentTaskCompletedTitleWithStatus(string, TaskStatus)
	SetInputModel(tea.Model) tea.Model
	SetTask(string, string)
	Warn(string)
}

type InputCompleted

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

type Model

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

func (Model) ErrorLog added in v0.26.0

func (m Model) ErrorLog(message string) string

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
	InfoLogBody     lipgloss.Style
	WarnLogHeading  lipgloss.Style
	WarnLogBody     lipgloss.Style
	ErrorLogHeading lipgloss.Style
	ErrorLogBody    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