cmd

package
v4.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2019 License: ISC Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NewAeNode = func() *aeternity.Node {
	return aeternity.NewNode(aeternity.Config.Node.URL, debug)
}

NewAeNode is just a helper function that gives you a Node so that you don't have to maintain a Node global variable (which needs the config vars to be read immediately, with this helper function you can defer the reading of the variables until the subcommand's execution) Defined as a var so unittests can mock this function out.

View Source
var NewCompiler = func() *aeternity.Compiler {
	return aeternity.NewCompiler(compilerURL, debug)
}

NewCompiler is just a helper function that gives you a Compiler so that you don't have to maintain a Compiler global variable (which needs the config vars to be read immediately, with this helper function you can defer the reading of the variables until the subcommand's execution) Defined as a var so unittests can mock this function out.

View Source
var RootCmd = &cobra.Command{
	Use:   "aecli",
	Short: "The command line client for the Aeternity blockchain",
	Long:  ``,
}

RootCmd represents the base command when called without any subcommands

Functions

func AskPassword

func AskPassword(question string) (password string, err error)

AskPassword ask a password

func AskYes

func AskYes(question string, defaultYes bool) (isYes bool)

AskYes prompt a yes/no question to the prompt

func DefaultIfEmptyStr

func DefaultIfEmptyStr(s *string, defaultS string)

DefaultIfEmptyStr set a default for a string if it is nulled

func Execute

func Execute(v string)

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func IsAddress

func IsAddress(a string) bool

IsAddress does some minor checks to ensure that the string is an ak_ address

func IsBytecode

func IsBytecode(a string) bool

IsBytecode does some minor checks to ensure that the string is a cb_ bytecode

func IsEmptyStr

func IsEmptyStr(s string) bool

IsEmptyStr tells if a string is empty or not

func IsEqStr

func IsEqStr(a, b string) bool

IsEqStr tells if two strings a and b are equals after trimming spaces and lowercasing

func IsTransaction

func IsTransaction(a string) bool

IsTransaction does some minor checks to ensure that the string is a tx_ transaction

Types

This section is empty.

Jump to

Keyboard shortcuts

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