Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDemoCmd ¶
GetDemoCmd exposes demoCmd so that it can be used as a sub-command by another cobra command instance.
func PrintfAsync ¶
func PrintfAsync(format string, a ...interface{})
PrintfAsync prints the given message for an asynchronous event. More precisely, the message is prepended with a newline and appended with the command prefix.
func Prompt ¶
Prompt waits for input on the command line and then executes the given function with the input.
func Setup ¶
func Setup()
Setup initializes the node, can not be done in init() since it needs the configuration from viper.
func StartTestAPI ¶
func StartTestAPI()
StartTestAPI sets the package variable `api` to a new `testAPI` listening at 0.0.0.0:8080. Should be called after setting up the node.
Types ¶
type CommandLineFlags ¶
type CommandLineFlags struct {
// contains filtered or unexported fields
}
CommandLineFlags contains the command line flags.
type Config ¶
type Config struct { Alias string SecretKey string Mnemonic string AccountIndex uint Channel channelConfig Node nodeConfig Chain chainConfig // Read from the network.yaml. The key is the alias. Peers map[string]*netConfigEntry }
Config contains all configuration read from config.yaml and network.yaml