promptuifactory

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PromptUiFactory

type PromptUiFactory interface {
	RunPrompt(label string, defaultValue string) (string, error)
	RunSelect(label string, items []string) (int, string, error)
	RunSelectWithSize(label string, items []string, size int) (int, string, error)
	RunSelectWithSizeAndSearcher(label string, items []string, size int, searcher func(string, int) bool) (int, string, error)
}

PromptUiFactory Used to generate necessary prompts injected into services The purpose is to be able to mock this Factory to be used in Unit Tests

type PromptUiFactoryImpl

type PromptUiFactoryImpl struct{}

func (*PromptUiFactoryImpl) RunPrompt

func (factory *PromptUiFactoryImpl) RunPrompt(label string, defaultValue string) (string, error)

func (*PromptUiFactoryImpl) RunSelect

func (factory *PromptUiFactoryImpl) RunSelect(label string, items []string) (int, string, error)

func (*PromptUiFactoryImpl) RunSelectWithSize

func (factory *PromptUiFactoryImpl) RunSelectWithSize(label string, items []string, size int) (int, string, error)

func (*PromptUiFactoryImpl) RunSelectWithSizeAndSearcher

func (factory *PromptUiFactoryImpl) RunSelectWithSizeAndSearcher(label string, items []string, size int, searcher func(string, int) bool) (int, string, error)

Jump to

Keyboard shortcuts

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