prompt

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExtensionSelector

func NewExtensionSelector(width int) list.Model

func SelectorInitCmd

func SelectorInitCmd() tea.Msg

func SetPromptErrorCmd

func SetPromptErrorCmd(err error) tea.Cmd

func SetPromptFeedbackCmd

func SetPromptFeedbackCmd(feedback string, finished bool) tea.Cmd

func SetPromptKindCmd

func SetPromptKindCmd(pk Kind) tea.Cmd

Types

type FeedbackMsg

type FeedbackMsg struct {
	Feedback string
	Finished bool
}

type Kind

type Kind int
const (
	None Kind = iota
	ChangeExtension
	ChangeVisibility
	GenerateSignedURL
	DeleteFile
)

type KindSetMsg

type KindSetMsg struct {
	Kind Kind
}

type Prompt

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

func New

func New(ctx context.Context, cfg *config.Config, db db.DB, width int) Prompt

func (Prompt) Init

func (p Prompt) Init() tea.Cmd

func (Prompt) Keys

func (p Prompt) Keys() help.KeyMap

func (Prompt) Update

func (p Prompt) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Prompt) View

func (p Prompt) View() string

type SelectorInitMsg

type SelectorInitMsg struct{}

type YNResult

type YNResult int
const (
	Undecided YNResult = iota
	Yes
	No
)

Jump to

Keyboard shortcuts

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