input

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppFs = afero.NewOsFs()

AppFs hold the file-system abstraction for this package

Functions

func LoadOrDefault

func LoadOrDefault(workDir string) (*config.Config, bool)

LoadOrDefault loads gebug's configuration file from the disk. Loads a default configuration in case of failure

func Setup

func Setup(currentConfig *config.Config, prompts []ConfigPrompt, workDir string) error

Setup runs a list of prompts and saves the user's input as config

Types

type ConfigPrompt

type ConfigPrompt interface {
	// Run asks for configuration field and saves it in configuration
	Run() error
}

ConfigPrompt asks for fields for the configuration

type PromptBuildCommand

type PromptBuildCommand struct {
	*config.Config
}

PromptBuildCommand handles the prompt that asks for build command

func (*PromptBuildCommand) Run

func (p *PromptBuildCommand) Run() error

Run asks the user for build command

type PromptDebuggerOptions

type PromptDebuggerOptions struct {
	*config.Config
	// contains filtered or unexported fields
}

PromptDebuggerOptions handles the prompt that asks for debugger options

func (*PromptDebuggerOptions) Run

func (p *PromptDebuggerOptions) Run() error

Run asks the user for debugger options

type PromptEnvironment

type PromptEnvironment struct {
	*config.Config
}

PromptEnvironment handles the prompt that asks for environment variables

func (*PromptEnvironment) Run

func (p *PromptEnvironment) Run() error

Run asks the user for environment variables

type PromptExposePort

type PromptExposePort struct {
	*config.Config
}

PromptExposePort handles the prompt that asks for expose ports

func (*PromptExposePort) Run

func (p *PromptExposePort) Run() error

Run asks the user for expose ports

type PromptName

type PromptName struct {
	*config.Config
}

PromptName handles the prompt that asks for application name

func (*PromptName) Run

func (p *PromptName) Run() error

Run asks the user for application name

type PromptNetworks

type PromptNetworks struct {
	*config.Config
}

PromptNetworks handles the prompt that asks for networks

func (*PromptNetworks) Run

func (p *PromptNetworks) Run() error

Run asks the user for networks to use

type PromptOutputBinary

type PromptOutputBinary struct {
	*config.Config
}

PromptOutputBinary handles the prompt that asks for output binary

func (*PromptOutputBinary) Run

func (p *PromptOutputBinary) Run() error

Run asks the user for the name of the output binary

type PromptRunCommand

type PromptRunCommand struct {
	*config.Config
}

PromptRunCommand handles the prompt that asks for run command

func (*PromptRunCommand) Run

func (p *PromptRunCommand) Run() error

Run asks the user for the run command

type PromptRuntimeImage

type PromptRuntimeImage struct {
	*config.Config
}

PromptRuntimeImage handles the prompt that asks for runtime image

func (*PromptRuntimeImage) Run

func (p *PromptRuntimeImage) Run() error

Run asks the user for the runtime image

type SelectWithAddAndRemove

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

SelectWithAddAndRemove provides a ui prompt for a list that supports both adding to and removing from a list

func NewSelectWithAddAndRemove

func NewSelectWithAddAndRemove(field *[]string, prompt *promptui.SelectWithAdd) *SelectWithAddAndRemove

NewSelectWithAddAndRemove constructs SelectWithAddAndRemove

func (*SelectWithAddAndRemove) Run

func (s *SelectWithAddAndRemove) Run() error

Run runs the prompt

Jump to

Keyboard shortcuts

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