uimodels

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PromptValue

func PromptValue(ctx context.Context) string

func WithContext

func WithContext(ctx context.Context, uiContext UIContext) context.Context

func WithPromptValue

func WithPromptValue(ctx context.Context, value string) context.Context

Types

type Operation

type Operation interface {
	Execute(ctx context.Context) error
}

type OperationFn

type OperationFn func(ctx context.Context) error

func (OperationFn) Execute

func (f OperationFn) Execute(ctx context.Context) error

type UIContext

type UIContext interface {
	Send(teaMessage tea.Msg)
	Message(msg string)
	Messagef(format string, args ...interface{})
	Input(prompt string, onDone Operation)
}

func Ctx

func Ctx(ctx context.Context) UIContext

Jump to

Keyboard shortcuts

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