cmd

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: MIT Imports: 20 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 GetAclCommands

func GetAclCommands() []*cli.Command

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 GetDatasetCommands

func GetDatasetCommands() []*cli.Command

GetDatasetCommands returns a list of CLI commands for managing database exports and imports.

func GetGeneratorCommands

func GetGeneratorCommands() []*cli.Command

func GetIndexerCommands

func GetIndexerCommands() []*cli.Command

func GetLoaderCommands

func GetLoaderCommands() []*cli.Command

func GetMigrationCommands

func GetMigrationCommands() []*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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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