Versions in this module Expand all Collapse all v1 v1.0.0 Nov 14, 2024 Changes in this version + const Add + const Cancel + const Del + const Done + const LessThanEq + const MoreInfo + const MoreThan + const MoreThanEq + const No + const NotEq + const Preview + const Yes + func CaptureBoolFlag(prompt Prompter, cmd *cobra.Command, flagName string, flagValue bool, ...) (bool, error) + func CaptureListDecision[T comparable](prompter Prompter, prompt string, capture func(prompt string) (T, error), ...) ([]T, bool, error) + func CheckSubnetAuthKeys(walletKeys []string, subnetAuthKeys []string, controlKeys []string, ...) error + func GetFujiKeyOrLedger(prompt Prompter, goal string, keyDir string) (bool, string, error) + func GetSubnetAuthKeys(prompt Prompter, walletKeys []string, controlKeys []string, threshold uint32) ([]string, error) + func RequestURL(url string) (*http.Response, error) + func ValidateHexa(input string) error + func ValidateRepoBranch(repo string, branch string) error + func ValidateRepoFile(repo string, branch string, file string) error + func ValidateURL(url string) error + type Comparator struct + Label string + Type string + Value uint64 + func (comparator *Comparator) Validate(val uint64) error + type Prompter interface + CaptureAddress func(promptStr string) (common.Address, error) + CaptureDate func(promptStr string) (time.Time, error) + CaptureEmail func(promptStr string) (string, error) + CaptureExistingFilepath func(promptStr string) (string, error) + CaptureFloat func(promptStr string, validator func(float64) error) (float64, error) + CaptureFujiDuration func(promptStr string) (time.Duration, error) + CaptureFutureDate func(promptStr string, minDate time.Time) (time.Time, error) + CaptureGitURL func(promptStr string) (*url.URL, error) + CaptureID func(promptStr string) (ids.ID, error) + CaptureIndex func(promptStr string, options []any) (int, error) + CaptureInt func(promptStr string) (int, error) + CaptureList func(promptStr string, options []string) (string, error) + CaptureListWithSize func(promptStr string, options []string, size int) (string, error) + CaptureMainnetDuration func(promptStr string) (time.Duration, error) + CaptureNewFilepath func(promptStr string) (string, error) + CaptureNoYes func(promptStr string) (bool, error) + CaptureNodeID func(promptStr string) (ids.NodeID, error) + CapturePChainAddress func(promptStr string, network models.Network) (string, error) + CapturePositiveBigInt func(promptStr string) (*big.Int, error) + CapturePositiveInt func(promptStr string, comparators []Comparator) (int, error) + CaptureRepoBranch func(promptStr string, repo string) (string, error) + CaptureRepoFile func(promptStr string, repo string, branch string) (string, error) + CaptureString func(promptStr string) (string, error) + CaptureStringAllowEmpty func(promptStr string) (string, error) + CaptureURL func(promptStr string, validateConnection bool) (string, error) + CaptureUint32 func(promptStr string) (uint32, error) + CaptureUint64 func(promptStr string) (uint64, error) + CaptureUint64Compare func(promptStr string, comparators []Comparator) (uint64, error) + CaptureValidatedString func(promptStr string, validator func(string) error) (string, error) + CaptureVersion func(promptStr string) (string, error) + CaptureWeight func(promptStr string) (uint64, error) + CaptureXChainAddress func(promptStr string, network models.Network) (string, error) + CaptureYesNo func(promptStr string) (bool, error) + ChooseKeyOrLedger func(goal string) (bool, error) + func NewPrompter() Prompter