interactive

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCanceled = errors.New("interactive flow canceled")
View Source
var IsTerminalFn = IsTerminal

Functions

func ClearProgress

func ClearProgress(w io.Writer)

func IsTerminal

func IsTerminal() bool

func PickContext

func PickContext(ctx context.Context, contexts []domain.TenantContext) (domain.TenantContext, error)

func PickSubscription

func PickSubscription(ctx context.Context, subscriptions []domain.Subscription) (domain.Subscription, error)

func WithSpinner

func WithSpinner[T any](
	ctx context.Context,
	w io.Writer,
	msg string,
	enabled bool,
	fn func(context.Context) (T, error),
) (T, error)

Types

type ActivationInput

type ActivationInput struct {
	Reason       string
	Duration     time.Duration
	AutoConfirm  bool
	Progress     *Activity
	KeepProgress bool
}

type Activity

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

func NewActivity

func NewActivity(w io.Writer) *Activity

func (*Activity) Start

func (a *Activity) Start(ctx context.Context, msg string)

func (*Activity) Stop

func (a *Activity) Stop()

type DeactivationInput

type DeactivationInput struct {
	Reason      string
	AutoConfirm bool
	Progress    io.Writer
}

type Spinner

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

func NewSpinner

func NewSpinner(w io.Writer, msg string) *Spinner

func (*Spinner) Start

func (s *Spinner) Start(ctx context.Context)

func (*Spinner) Stop

func (s *Spinner) Stop()

Jump to

Keyboard shortcuts

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