cli

package
v1.0.1-sph Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

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.

func UpgradeInfoFromTag

func UpgradeInfoFromTag(ctx context.Context, tag string, pretty bool) (string, error)

UpgradeInfoFromTag generate upgrade info from give tag tag - release tag pretty - either prettify (true) json output or not (false)

Types

type UpgradeInfo

type UpgradeInfo struct {
	Binaries map[string]string `json:"binaries"`
	Configs  map[string]string `json:"configs,omitempty"`
}

UpgradeInfo is expected format for the info field to allow auto-download

Jump to

Keyboard shortcuts

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