Documentation ¶
Index ¶
- func DefaultConfigSetup(cfg config.Config, sdkConfig *sdk.Config)
- func ParseCmd(cmdCfg *Config) *cobra.Command
- func ReadConfig(cfg *Config) types.CobraCmdFunc
- func StartParsing(ctx *Context) 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) WithConfigParser(p config.Parser) *Config
- func (cfg *Config) WithDBBuilder(b database.Builder) *Config
- func (cfg *Config) WithEncodingConfigBuilder(b EncodingConfigBuilder) *Config
- func (cfg *Config) WithLogger(logger logging.Logger) *Config
- func (cfg *Config) WithRegistrar(r registrar.Registrar) *Config
- func (cfg *Config) WithSetupConfig(s SdkConfigSetup) *Config
- type Context
- 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 ParseCmd ¶
ParseCmd returns the command that should be run when we want to start parsing a chain state.
func ReadConfig ¶
func ReadConfig(cfg *Config) types.CobraCmdFunc
ReadConfig parses the configuration file for the executable having the give name using the provided configuration parser
func StartParsing ¶
StartParsing represents the function that should be called when the parse command is executed
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
func (*Config) WithConfigParser ¶
WithConfigParser sets the configuration parser to be used
func (*Config) WithDBBuilder ¶
WithDBBuilder sets the database builder to be used
func (*Config) WithEncodingConfigBuilder ¶
func (cfg *Config) WithEncodingConfigBuilder(b EncodingConfigBuilder) *Config
WithEncodingConfigBuilder sets the configurations builder to be used
func (*Config) WithLogger ¶
WithLogger sets the logger to be used while parsing the data
func (*Config) WithRegistrar ¶
WithRegistrar sets the modules registrar to be used
func (*Config) WithSetupConfig ¶
func (cfg *Config) WithSetupConfig(s SdkConfigSetup) *Config
WithSetupConfig sets the SDK setup configurator to be used
type Context ¶
type Context struct { EncodingConfig *params.EncodingConfig Node node.Node Database database.Database Logger logging.Logger Modules []modules.Module }
Context contains the parsing context
func GetParsingContext ¶
GetParsingContext setups all the things that should be later passed to StartParsing in order to parse the chain data properly.
type EncodingConfigBuilder ¶
type EncodingConfigBuilder func() params.EncodingConfig
EncodingConfigBuilder represents a function that is used to return the proper encoding config.