Documentation ¶
Overview ¶
Package cmd provides command-line interface commands for the application. It defines a registry of commands categorized by their application modules. This package leverages the github.com/urfave/cli/v2 library for CLI interactions.
Index ¶
- func AddCommand(name string, commands []*cli.Command) bool
- func AddCommands(commands map[string][]*cli.Command) bool
- func GetCommands() map[string][]*cli.Command
- func GetMigrationCommands() []*cli.Command
- func GetQueryCommands() []*cli.Command
- func GetRegisteredCommands() []string
- func GetRpcCommands() []*cli.Command
- func GetRunnerCommands() []*cli.Command
- func GetSyncerCommands() []*cli.Command
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommand ¶
AddCommand adds a single CLI command to the registry under a specified module name. If the module name does not exist in the current registry, the commands are added. If the module name exists, the commands are appended to the existing slice. Returns true if the commands are added successfully, false if the commands are not added because the module name already exists.
func AddCommands ¶
AddCommands adds a map of CLI commands to the existing registry. The function iterates over the provided commands map and uses AddCommand to add each command under the specified module name. Returns true if all commands are added successfully, otherwise returns false.
func GetCommands ¶
func GetCommands() map[string][]*cli.Command
GetCommands returns the complete registry of CLI commands. This function provides access to all the registered commands for different modules of the application. It is typically used to initialize the CLI application with all the necessary commands.
func GetMigrationCommands ¶
func GetMigrationCommands() []*cli.Command
func GetQueryCommands ¶
func GetQueryCommands() []*cli.Command
func GetRegisteredCommands ¶
func GetRegisteredCommands() []string
GetRegisteredCommands retrieves a slice of all registered module names. This is helpful for determining which modules have been initialized and are available for interaction via the CLI.
func GetRpcCommands ¶
func GetRpcCommands() []*cli.Command
func GetRunnerCommands ¶
func GetRunnerCommands() []*cli.Command
func GetSyncerCommands ¶
func GetSyncerCommands() []*cli.Command
Types ¶
This section is empty.