cmd

package
v0.0.0-...-2adbdf0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: CC0-1.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version defines the application version (defined at compile time)
	Version = ""

	// Commit defines the application commit hash (defined at compile time)
	Commit = ""
)
View Source
var (
	FlagHome = "home"
)

Functions

func BuildDefaultExecutor

func BuildDefaultExecutor(config *cmdtypes.Config) cli.Executor

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

func PrepareRootCmd(name string, cmd *cobra.Command) cli.Executor

PrepareRootCmd is meant to prepare the given command binding all the viper flags

func RootCmd

func RootCmd(name string) *cobra.Command

RootCmd allows to build the default root command having the given name

func VersionCmd

func VersionCmd() *cobra.Command

VersionCmd returns the command that allows to show the version information

Types

This section is empty.

Directories

Path Synopsis
actions
fix

Jump to

Keyboard shortcuts

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