Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Version defines the application version (defined at compile time) Version = "" // Commit defines the application commit hash (defined at compile time) Commit = "" )
var (
FlagHome = "home"
)
Functions ¶
func BuildDefaultExecutor ¶
BuildDefaultExecutor allows to build an Executor containing a root command that has the provided name and description and the default version and parse sub-commands implementations.
registrar will be used to register custom modules. Be sure to provide an implementation that returns all the modules that you want to use. If you don't want any custom module, use modules.EmptyRegistrar.
setupCfg method will be used to customize the SDK configuration. If you don't want any customization you can use the config.DefaultConfigSetup variable.
encodingConfigBuilder is used to provide a codec that will later be used to deserialize the transaction messages. Make sure you register all the types you need properly.
dbBuilder is used to provide the database that will be used to save the data. If you don't have any particular need, you can use the Create variable to build a default database instance.
func PrepareRootCmd ¶
PrepareRootCmd is meant to prepare the given command binding all the viper flags
func VersionCmd ¶
VersionCmd returns the command that allows to show the version information
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config represents the general configuration for the commands
func (*Config) GetInitConfig ¶
GetInitConfig returns the currently set parse configuration
func (*Config) GetParseConfig ¶
GetParseConfig returns the currently set parse configuration
func (*Config) WithInitConfig ¶
WithInitConfig sets cfg as the parse command configuration