Documentation ¶
Index ¶
- Constants
- Variables
- func Confirm(msg string) (string, error)
- func CouponCode() (string, error)
- func CredentialAlias(creds []*mModels.Credential) (*mModels.Credential, string, string, error)
- func CreditCard() (*stripe.Token, error)
- func Email(defaultValue string) (string, error)
- func EmailVerificationCode(defaultValue string) (string, error)
- func FullName(defaultValue string) (string, error)
- func HandleSelectError(err error, generic string) error
- func InvitationCode(defaultValue string) (string, error)
- func Name(field, defaultValue string, autoSelect, allowEmpty bool) (string, error)
- func NewSpinner(suffix string) *spinner.Spinner
- func Password() (string, error)
- func ProjectDescription(defaultValue string, autoSelect bool) (string, error)
- func ProjectTitle(defaultValue string, autoSelect bool) (string, error)
- func ResourceName(defaultValue string, autoSelect bool) (string, error)
- func ResourceTitle(defaultValue string, autoSelect bool) (string, error)
- func SelectAPIToken(tokens []*iModels.APIToken) (*iModels.APIToken, error)
- func SelectContext(teams []*iModels.Team, name string, userTuple *[]string) (int, string, error)
- func SelectCredential(creds []*mModels.Credential) (*mModels.Credential, string, error)
- func SelectPlan(list []*cModels.Plan, name string) (int, string, error)
- func SelectProduct(list []*cModels.Product, name string) (int, string, error)
- func SelectProject(list []*mModels.Project, name string, emptyOption, showResult bool) (int, string, error)
- func SelectProvider(list []*cModels.Provider) (*cModels.Provider, error)
- func SelectRegion(list []*cModels.Region) (int, string, error)
- func SelectResource(list []*mModels.Resource, projects []*mModels.Project, name string) (int, string, error)
- func SelectRole(roles []string) (string, error)
- func SelectTeam(teams []*iModels.Team, name string, userTuple *[]string) (int, string, error)
- func SpinStart(suffix string)
- func SpinStop()
- func TeamTitle(defaultValue string, autoSelect bool) (string, error)
- func Title(field, defaultValue string, autoSelect, allowEmpty bool) (string, error)
- func TokenDescription() (string, error)
Constants ¶
const NumberMask = '#'
NumberMask is the character used to mask number inputs
const PasswordMask = '●'
PasswordMask is the character used to mask password inputs
Variables ¶
var IsInteractive = true
IsInteractive tells whether a terminal support interaction, such as prompts and colors.
Functions ¶
func CouponCode ¶
CouponCode prompts the user to input an alphanumeric coupon code.
func CredentialAlias ¶ added in v0.10.0
func CredentialAlias(creds []*mModels.Credential) (*mModels.Credential, string, string, error)
CredentialAlias asks the user to supply a new alias for the given cred
func CreditCard ¶
func CreditCard() (*stripe.Token, error)
CreditCard handles receiving and tokenizing payment information
func EmailVerificationCode ¶
EmailVerificationCode prompts the user to input a person's name
func HandleSelectError ¶
HandleSelectError returns a cli error if the error is not an EOF or Interrupt
func InvitationCode ¶ added in v0.11.0
InvitationCode prompts the user to input an invitation token to join a team.
func NewSpinner ¶
NewSpinner returns a customized spinner
func ProjectDescription ¶
ProjectDescription prompts the user to enter a project description
func ProjectTitle ¶ added in v0.8.1
ProjectTitle prompts the user to enter a new project title
func ResourceName ¶
ResourceName prompts the user to provide a label name
func ResourceTitle ¶ added in v0.8.1
ResourceTitle prompts the user to provide a resource title or to accept empty to let the system generate one.
func SelectAPIToken ¶ added in v0.8.1
SelectAPIToken prompts the user to choose from a list of tokens
func SelectContext ¶
SelectContext runs a SelectTeam for context purposes
func SelectCredential ¶ added in v0.10.0
func SelectCredential(creds []*mModels.Credential) (*mModels.Credential, string, error)
SelectCredential prompts the user to choose from a list of credentials
func SelectPlan ¶
SelectPlan prompts the user to select a plan from the given list.
func SelectProduct ¶
SelectProduct prompts the user to select a product from the given list.
func SelectProject ¶
func SelectProject(list []*mModels.Project, name string, emptyOption, showResult bool) (int, string, error)
SelectProject prompts the user to select a project from the given list.
func SelectProvider ¶
SelectProvider prompts the user to select a provider resource from the given list.
func SelectRegion ¶
SelectRegion prompts the user to select a region from the given list.
func SelectResource ¶
func SelectResource(list []*mModels.Resource, projects []*mModels.Project, name string) (int, string, error)
SelectResource promps the user to select a provisioned resource from the given list
func SelectRole ¶ added in v0.8.0
SelectRole prompts the user to select a role from the given list.
func SelectTeam ¶
SelectTeam prompts the user to select a team from the given list. -1 as the first return value indicates no team has been selected
func SpinStart ¶
func SpinStart(suffix string)
SpinStart starts the spinning animation for the global spinner
func TokenDescription ¶ added in v0.8.1
TokenDescription prompts the user to enter a token description
Types ¶
This section is empty.