cli

package
v0.23.0-rc12 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	FlagLogColor     = "log_color"
	FlagLogTimestamp = "log_timestamp"
)

Variables

View Source
var (
	ErrEmptyEnvPrefix = errors.New("envPrefixes parameter must contain at least one prefix")
)

Functions

func GetConfirmation

func GetConfirmation(cmd *cobra.Command, prompt string) (bool, error)

func InterceptConfigsPreRunHandler

func InterceptConfigsPreRunHandler(
	cmd *cobra.Command,
	envPrefixes []string,
	allowEmptyEnv bool,
	customAppConfigTemplate string,
	customAppConfig interface{},
) error

InterceptConfigsPreRunHandler performs a pre-run function for the root daemon application command. It will create a Viper literal and a default server Context. The server Tendermint configuration will either be read and parsed or created and saved to disk, where the server Context is updated to reflect the Tendermint configuration. It takes custom app config template and config settings to create a custom Tendermint configuration. If the custom template is empty, it uses default-template provided by the server. The Viper literal is used to read and parse the application configuration. Command handlers can fetch the server Context to get the Tendermint configuration or to get access to Viper.

Types

This section is empty.

Jump to

Keyboard shortcuts

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