Documentation
¶
Index ¶
- Constants
- type DialogUi
- func (ui *DialogUi) GetFromInput(title, defaultInput, helpButtonLabel, extraButtonLabel string) (string, error)
- func (ui *DialogUi) GetIpFromInput(title, helpButtonLabel, extraButtonLabel string) (string, error)
- func (ui *DialogUi) GetPasswordFromInput(host, user, helpButtonLabel, extraButtonLabel string, confirm bool) (passwd1 string, err error)
- func (ui *DialogUi) GetPathToDirFromInput(title, defaultDir, helpButtonLabel, extraButtonLabel string) (string, error)
- func (ui *DialogUi) GetPathToFileFromInput(title, helpButtonLabel, extraButtonLabel string) (string, error)
- func (ui *DialogUi) Output(ntype string, msgs ...string)
- func (ui *DialogUi) Progress(title, pbMsg string, duration time.Duration, step int, done chan error) error
- func (ui *DialogUi) Wait(msg string, pause, timeOut time.Duration, done chan error) error
- type Pb
Constants ¶
View Source
const ( DialogExit = "exit status 1" DialogMoveBack = "exit status 2" DialogNext = "exit status 3" )
View Source
const ( Success = "Success" Error = "Failure" Warning = "Warning" Notification = "Notification" None = "" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DialogUi ¶
type DialogUi struct { *Dialog Pb *Pb }
func NewDialogUi ¶
func NewDialogUi() *DialogUi
func (*DialogUi) GetFromInput ¶
func (ui *DialogUi) GetFromInput(title, defaultInput, helpButtonLabel, extraButtonLabel string) (string, error)
GetFromInput uses a dialog session for reading from stdin Returns user input
func (*DialogUi) GetIpFromInput ¶
GetIpFromInput uses a dialog session for reading IP from user input Returns host IP (remote or local)
func (*DialogUi) GetPasswordFromInput ¶
func (ui *DialogUi) GetPasswordFromInput(host, user, helpButtonLabel, extraButtonLabel string, confirm bool) (passwd1 string, err error)
GetPasswordFromInput uses a dialog session for reading user password from user input Returns password string
func (*DialogUi) GetPathToDirFromInput ¶
func (ui *DialogUi) GetPathToDirFromInput(title, defaultDir, helpButtonLabel, extraButtonLabel string) (string, error)
GetPathToDirFromInput uses a dialog session for getting path to a directory to upload
func (*DialogUi) GetPathToFileFromInput ¶
func (ui *DialogUi) GetPathToFileFromInput(title, helpButtonLabel, extraButtonLabel string) (string, error)
GetPathToFileFromInput uses a dialog session for getting path to a file
func (*DialogUi) Output ¶
Output gets dialog session , height/width and slice of strings Prints out appropriate message
type Pb ¶
type Pb struct {
// contains filtered or unexported fields
}
func (*Pb) DecreaseStep ¶
func (*Pb) IncreaseSleep ¶
func (*Pb) IncreaseStep ¶
Click to show internal directories.
Click to hide internal directories.