Documentation ¶
Index ¶
- Constants
- Variables
- func AddFlag(flags *pflag.FlagSet)
- func AddModeFlag(cmd *cobra.Command)
- func BuildAutomaticUpgradeSchedule(cmd *cobra.Command, schedule string) (string, error)
- func BuildManualUpgradeSchedule(cmd *cobra.Command, scheduleDate string, scheduleTime string) (time.Time, error)
- func Enable()
- func Enabled() bool
- func GetAddonArgument(param asv1.AddonParameter, dflt string) (string, error)
- func GetBool(input Input) (a bool, err error)
- func GetCert(input Input) (a string, err error)
- func GetFloat(input Input) (a float64, err error)
- func GetIPNet(input Input) (a net.IPNet, err error)
- func GetInt(input Input) (a int, err error)
- func GetMode() (string, error)
- func GetMultipleOptions(input Input) ([]string, error)
- func GetOption(input Input) (a string, err error)
- func GetOptionMode(cmd *cobra.Command, mode string, question string) (string, error)
- func GetPassword(input Input) (a string, err error)
- func GetString(input Input) (a string, err error)
- func IsCIDR(val interface{}) error
- func IsCert(filepath interface{}) error
- func IsURL(val interface{}) error
- func IsURLHttps(val interface{}) error
- func IsValidHostname(val interface{}) error
- func PrintHelp(help Help) error
- func SetEnabled(setEnabled bool)
- func SetModeKey(key string)
- type Help
- type Input
- type Validator
- func AvailabilityZonesCountValidator(multiAZ bool) Validator
- func MachinePoolRootDiskSizeValidator(version string) Validator
- func MaxValue(max int) Validator
- func MinValue(min int) Validator
- func NodePoolRootDiskSizeValidator() Validator
- func RegExp(restr string) Validator
- func RegExpBoolean(restr string) Validator
- func SubnetsValidator(awsClient aws.Client, multiAZ bool, privateLink bool, hostedCP bool) Validator
Constants ¶
const ( Mode = "mode" ModeAuto = "auto" ModeManual = "manual" )
Variables ¶
var MaxLength = func(length int) Validator { return Validator(survey.MaxLength(length)) }
var Modes = []string{ModeAuto, ModeManual}
Functions ¶
func AddModeFlag ¶ added in v1.2.38
func BuildAutomaticUpgradeSchedule ¶ added in v1.2.23
func BuildManualUpgradeSchedule ¶ added in v1.2.23
func Enabled ¶
func Enabled() bool
Enabled returns a boolean flag that indicates if the interactive mode is enabled.
func GetAddonArgument ¶ added in v1.2.14
func GetAddonArgument(param asv1.AddonParameter, dflt string) (string, error)
func GetMultipleOptions ¶
Asks for multiple options selection
func GetOptionMode ¶ added in v1.2.38
func GetPassword ¶
Gets password input from the command line
func IsCert ¶ added in v1.1.1
func IsCert(filepath interface{}) error
IsCert validates whether the given filepath is a valid cert file
func IsURL ¶ added in v1.1.1
func IsURL(val interface{}) error
IsURL validates whether the given value is a valid URL
func IsURLHttps ¶ added in v1.2.26
func IsURLHttps(val interface{}) error
func IsValidHostname ¶ added in v1.2.37
func IsValidHostname(val interface{}) error
IsValidHostname is same validation as in the Open Shift GitHub IDP CRD Validates the hostname DNS1123 format https://github.com/openshift/kubernetes/blob/91607f5d750ba4002f87d34a12ae1cfd45b45b81/openshift-kube-apiserver/admission/customresourcevalidation/oauth/helpers.go#L13 and denies any [*.]github.com hostnames https://github.com/openshift/kubernetes/blob/258f1d5fb6491ba65fd8201c827e179432430627/openshift-kube-apiserver/admission/customresourcevalidation/oauth/validate_github.go#L49 nolint
func SetEnabled ¶ added in v1.2.40
func SetEnabled(setEnabled bool)
func SetModeKey ¶ added in v1.2.38
func SetModeKey(key string)
Types ¶
type Validator ¶ added in v1.1.1
type Validator survey.Validator
func AvailabilityZonesCountValidator ¶ added in v1.2.5
func MachinePoolRootDiskSizeValidator ¶ added in v1.2.26
func MaxValue ¶ added in v1.2.31
MaxValue returns a Validator that validates the entered number is less than or equal to max
func MinValue ¶ added in v1.2.31
MinValue returns a validator that validates the entered number is greater than or equal to min
func NodePoolRootDiskSizeValidator ¶ added in v1.2.45
func NodePoolRootDiskSizeValidator() Validator