prompts

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 19, 2022 License: BSD-3-Clause Imports: 15 Imported by: 6

Documentation

Overview

Copyright (C) 2022, Ava Labs, Inc. All rights reserved. See the file LICENSE for licensing terms.

Index

Constants

View Source
const (
	Yes = "Yes"
	No  = "No"

	Add      = "Add"
	Del      = "Delete"
	Preview  = "Preview"
	MoreInfo = "More Info"
	Done     = "Done"
	Cancel   = "Cancel"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Prompter added in v0.2.0

type Prompter interface {
	CapturePositiveBigInt(promptStr string) (*big.Int, error)
	CaptureAddress(promptStr string, arg any) (any, error)
	CaptureExistingFilepath(promptStr string) (string, error)
	CaptureYesNo(promptStr string) (bool, error)
	CaptureNoYes(promptStr string) (bool, error)
	CaptureList(promptStr string, options []string) (string, error)
	CaptureString(promptStr string) (string, error)
	CaptureIndex(promptStr string, options []any) (int, error)
	CaptureVersion(promptStr string) (string, error)
	CaptureDuration(promptStr string) (time.Duration, error)
	CaptureDate(promptStr string) (time.Time, error)
	CaptureNodeID(promptStr string) (ids.NodeID, error)
	CaptureWeight(promptStr string) (uint64, error)
	CaptureUint64(promptStr string) (uint64, error)
	CapturePChainAddress(promptStr string, network any) (any, error)
	CaptureListDecision(

		prompter Prompter,

		prompt string,

		capture func(prompt string, args any) (any, error),

		capturePrompt string,

		label string,

		info string,

		arg any,
	) ([]any, bool, error)
}

func NewPrompter added in v0.2.0

func NewPrompter() Prompter

NewProcessChecker creates a new process checker which can respond if the server is running

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL