Documentation ¶
Index ¶
- func DefaultConfigSetup(cfg config.Config, sdkConfig *sdk.Config)
- func GetParserContext(cfg config.Config, parseConfig *Config) (*parser.Context, error)
- func ReadConfig(cfg *Config) (config.Config, error)
- func ReadConfigPreRunE(cfg *Config) types.CobraCmdFunc
- func UpdatedGlobalCfg(cfg *Config) error
- type Config
- func (cfg *Config) GetConfigParser() config.Parser
- func (cfg *Config) GetDBBuilder() database.Builder
- func (cfg *Config) GetEncodingConfigBuilder() EncodingConfigBuilder
- func (cfg *Config) GetLogger() logging.Logger
- func (cfg *Config) GetRegistrar() registrar.Registrar
- func (cfg *Config) GetSetupConfig() SdkConfigSetup
- func (cfg *Config) WithRegistrar(r registrar.Registrar) *Config
- type EncodingConfigBuilder
- type SdkConfigSetup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigSetup ¶
DefaultConfigSetup represents a handy implementation of SdkConfigSetup that simply setups the prefix inside the configuration
func GetParserContext ¶
GetParserContext setups all the things that can be used to later parse the chain state
func ReadConfig ¶
ReadConfig allows to read the configuration using the provided cfg
func ReadConfigPreRunE ¶
func ReadConfigPreRunE(cfg *Config) types.CobraCmdFunc
ReadConfigPreRunE represents a Cobra cmd function allowing to read the config before executing the command itself
func UpdatedGlobalCfg ¶
UpdatedGlobalCfg parses the configuration file using the provided configuration and sets the parsed config as the global one
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config contains all the configuration for the "parse" command
func (*Config) GetConfigParser ¶
GetConfigParser returns the configuration parser to be used
func (*Config) GetDBBuilder ¶
GetDBBuilder returns the database builder to be used
func (*Config) GetEncodingConfigBuilder ¶
func (cfg *Config) GetEncodingConfigBuilder() EncodingConfigBuilder
GetEncodingConfigBuilder returns the encoding config builder to be used
func (*Config) GetRegistrar ¶
GetRegistrar returns the modules registrar to be used
func (*Config) GetSetupConfig ¶
func (cfg *Config) GetSetupConfig() SdkConfigSetup
GetSetupConfig returns the SDK configuration builder to use
type EncodingConfigBuilder ¶
type EncodingConfigBuilder func() params.EncodingConfig
EncodingConfigBuilder represents a function that is used to return the proper encoding config.