events

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Confirm

func Confirm(prompt string, onResult func(yes bool) tea.Msg) tea.Msg

func ConfirmYes

func ConfirmYes(prompt string, onYes func() tea.Msg) tea.Msg

func Error

func Error(err error) tea.Msg

func PromptForInput

func PromptForInput(prompt string, history services.HistoryProvider, onDone func(value string) tea.Msg) tea.Msg

func SetStatus

func SetStatus(msg string) tea.Cmd

func SetTeaMessage

func SetTeaMessage(event tea.Msg) tea.Cmd

Types

type ErrorMsg

type ErrorMsg error

Error indicates that an error occurred

type ForegroundJobUpdate

type ForegroundJobUpdate struct {
	JobRunning bool
	JobStatus  string
}

type MessageWithMode

type MessageWithMode interface {
	MessageWithStatus
	ModeMessage() string
}

type MessageWithStatus

type MessageWithStatus interface {
	StatusMessage() string
}

type ModeMessage

type ModeMessage string

ModeMessage indicates that the mode should be changed to the following

type PromptForInputMsg

type PromptForInputMsg struct {
	Prompt   string
	History  services.HistoryProvider
	OnDone   func(value string) tea.Msg
	OnCancel func() tea.Msg
}

PromptForInput indicates that the context is requesting a line of input

type StatusMsg

type StatusMsg string

Message indicates that a message should be shown to the user

type WrappedStatusMsg

type WrappedStatusMsg struct {
	Message StatusMsg
	Next    tea.Msg
}

Jump to

Keyboard shortcuts

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