Documentation ¶
Overview ¶
Package prompt implements input-related functionality.
Index ¶
- func Confirm(ctx context.Context, message string) (confirm bool, err error)
- func Confirmf(ctx context.Context, format string, a ...interface{}) (bool, error)
- func IsNonInteractive(err error) bool
- func Org(ctx context.Context, typ *api.OrganizationType) (*api.Organization, error)
- func Password(ctx context.Context, dst *string, msg string, required bool) error
- func Region(ctx context.Context) (*api.Region, error)
- func Select(ctx context.Context, index *int, msg, def string, options ...string) error
- func SelectOrg(ctx context.Context, orgs []api.Organization) (org *api.Organization, err error)
- func SelectRegion(ctx context.Context, regions []api.Region, defaultCode string) (region *api.Region, err error)
- func String(ctx context.Context, dst *string, msg, def string, required bool) error
- type NonInteractiveError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNonInteractive ¶
func Org ¶
func Org(ctx context.Context, typ *api.OrganizationType) (*api.Organization, error)
Org returns the Organization the user has passed in via flag or prompts the user for one.
func Region ¶
Region returns the region the user has passed in via flag or prompts the user for one.
func SelectOrg ¶
func SelectOrg(ctx context.Context, orgs []api.Organization) (org *api.Organization, err error)
func SelectRegion ¶
Types ¶
type NonInteractiveError ¶
type NonInteractiveError string
func (NonInteractiveError) Error ¶
func (e NonInteractiveError) Error() string
func (NonInteractiveError) Unwrap ¶
func (NonInteractiveError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.