Documentation ¶
Index ¶
Constants ¶
View Source
const VERSION = version.VERSION
Variables ¶
View Source
var ErisCMCmd = &cobra.Command{ Use: "eris-cm", Short: "The Eris Chain Manager is a utility for performing complex operations on eris chains", Long: `The Eris Chain Manager is a utility for performing complex operations on eris chains. Made with <3 by Eris Industries. Complete documentation is available at https://docs.erisindustries.com ` + "\nVersion:\n " + VERSION, PersistentPreRun: func(cmd *cobra.Command, args []string) { log.SetFormatter(logger.ErisFormatter{}) log.SetLevel(log.WarnLevel) if do.Verbose { log.SetLevel(log.InfoLevel) } else if do.Debug { log.SetLevel(log.DebugLevel) } }, Run: func(cmd *cobra.Command, args []string) { cmd.Help() }, }
Defining the root command
View Source
var MakerCmd = &cobra.Command{ Use: "make", Short: "The Eris Chain Maker is a utility for easily creating the files necessary to build eris chains", Long: `The Eris Chain Maker is a utility for easily creating the files necessary to build eris chains.`, Example: `$ eris-cm make myChain -- will use the chain-making wizard and make your chain named myChain using eris-keys defaults (available via localhost) (interactive) $ eris-cm make myChain --chain-type=simplechain -- will use the chain type definition files to make your chain named myChain using eris-keys defaults (non-interactive) $ eris-cm make myChain --account-types=Root:1,Developer:0,Validator:0,Participant:1 -- will use the flag to make your chain named myChain using eris-keys defaults (non-interactive) $ eris-cm make myChain --account-types=Root:1,Developer:0,Validator:0,Participant:1 --chain-type=simplechain -- account types trump chain types, this command will use the flags to make the chain (non-interactive) $ eris-cm make myChain --csv /path/to/csv -- will use the csv file to make your chain named myChain using eris-keys defaults (non-interactive)`, PreRun: func(cmd *cobra.Command, args []string) { for _, d := range ChainsDirs { if _, err := os.Stat(d); os.IsNotExist(err) { os.MkdirAll(d, 0755) } } util.CheckDefaultTypes(AccountsTypePath, "account_types") util.CheckDefaultTypes(ChainTypePath, "chain_types") keys.DaemonAddr = keysAddr log.Info("Hello! I'm the marmot who makes eris chains.") }, Run: MakeChain, PostRun: Archive, }
Functions ¶
func AddCommands ¶
func AddCommands()
func AddGlobalFlags ¶
func AddGlobalFlags()
func AddMakerFlags ¶
func AddMakerFlags()
Flags that are to be used by commands are handled by the Do struct Define the persistent commands (globals)
func InitErisChainManager ¶
func InitErisChainManager()
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.