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 ¶ added in v0.0.271
Region returns the region the user has passed in via flag or prompts the user for one.
func SelectOrg ¶ added in v0.0.257
func SelectOrg(ctx context.Context, orgs []api.Organization) (org *api.Organization, err error)
func SelectRegion ¶ added in v0.0.271
Types ¶
type NonInteractiveError ¶ added in v0.0.261
type NonInteractiveError string
func (NonInteractiveError) Error ¶ added in v0.0.261
func (e NonInteractiveError) Error() string
func (NonInteractiveError) Unwrap ¶ added in v0.0.261
func (NonInteractiveError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.