cmd

package
v0.0.0-...-77d485b Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommand

func AddCommand(name string, commands []*cli.Command) bool

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

func AddCommands(commands map[string][]*cli.Command) bool

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.

Jump to

Keyboard shortcuts

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