Documentation
¶
Index ¶
Constants ¶
View Source
const ( // OmittedDefaultFlagValue is used whenever a flag is required but no reasonable default value can be provided. // In most cases, this forces the user to specify the flag value to avoid unintended behavior. OmittedDefaultFlagValue = "intentionally omitting default" // DEV_NOTE: use cosmosflags.FlagGRPC for the flag name. FlagGRPCUsage = "" /* 208-byte string literal not displayed */ // DEV_NOTE: use cosmosflags.FlagGRPCInsecure for the flag name. FlagGRPCInsecureUsage = "Allow gRPC over insecure channels, if not the server MUST be TLS terminated" // DEV_NOTE: use cosmosflags.FlagLogLevelUsage for the flag name. FlagLogLevelUsage = "The logging level (debug|info|warn|error)" DefaultLogLevel = "info" FlagLogOutput = "log-output" FlagLogOutputUsage = "The logging output (<path>|'discard'|'stderr'); defaults to stdout ('-')" DefaultLogOutput = "-" FlagPassphrase = "passphrase" FlagPassphraseShort = "p" FlagPassphraseUsage = "" /* 139-byte string literal not displayed */ FlagNoPassphrase = "no-passphrase" FlagNoPassphraseUsage = "attempt to use an empty passphrase to decrypt the exported Morse key file for signing" FlagInputFile = "input-file" FlagInputFileUsage = "An absolute or relative path to an input file that can be used to read data from. This will not be overwritten." FlagOutputFile = "output-file" FlagOutputFileUsage = "" /* 156-byte string literal not displayed */ FlagNetwork = "network" FlagNetworkUsage = "" /* 133-byte string literal not displayed */ DefaultNetwork = "" FlagFaucetBaseURL = "base-url" FlagFaucetBaseURLUsage = "The base URL of the Pocket Network Faucet" // TODO_UP_NEXT(@bryanchriswhite): Update to the MainNet URL once available. DefaultFaucetBaseURL = "https://shannon-testnet-grove-faucet.beta.poktroll.com" FaucetConfigPath = "faucet-config-path" // TODO_UP_NEXT(@bryanchriswhite): explicitly set config. FaucetConfigPathUsage = "Path to the faucet config yaml file ($HOME/.{pocket,poktroll} and PWD are searched by default)" DefaultFaucetConfigPath = "" FaucetListenAddress = "listen-address" FaucetListenAddressUsage = "The listen address of the Pocket Network Faucet in the form of host:port" DefaultFaucetListenAddress = "0.0.0.0:8080" LocalNetworkName = "local" AlphaNetworkName = "alpha" BetaNetworkName = "beta" MainNetworkName = "main" BooleanTrueValue = "true" BooleanFalseValue = "false" // FlagQueryCaching is the flag name to enable or disable query caching. FlagQueryCaching = "query-caching" FlagQueryCachingUsage = "(Optional) Enable or disable onchain query caching" DefaultFlagQueryCaching = true // DefaultNodeRPCURL is the cosmos-sdk default --node flag value: // • Hard-coded in cosmos-sdk CLI and cannot be changed since registered by cosmos-sdk // • Used only for comparison, not flag registration // See: https://github.com/cosmos/cosmos-sdk/blob/v0.53.2/client/flags/flags.go#L108 DefaultNodeRPCURL = "tcp://localhost:26657" )
Variables ¶
View Source
var ( ErrFlagNotRegistered = cosmoserrors.Register(namespace, 1200, "flag not registered") ErrFlagInvalidValue = cosmoserrors.Register(namespace, 1201, "flag value is invalid") )
Functions ¶
func GetFlag ¶ added in v0.1.29
GetFlag retrieves a flag instance from the command. Returns ErrFlagNotRegistered if the flag doesn't exist.
func GetFlagBool ¶ added in v0.1.29
GetFlagBool parses a flag's string value as a boolean. Returns error if flag is not registered or value is not 'true'/'false'.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.