Documentation ¶
Index ¶
- func ParseCmd(cmdCfg *Config) *cobra.Command
- func ReadConfig(cfg *Config) types.CobraCmdFunc
- func StartParsing(data *ParserData) error
- type Config
- func (config *Config) GetConfigParser() types.ConfigParser
- func (config *Config) GetDBBuilder() db.Builder
- func (config *Config) GetEncodingConfigBuilder() types.EncodingConfigBuilder
- func (cfg *Config) GetLogger() logging.Logger
- func (config *Config) GetRegistrar() registrar.Registrar
- func (config *Config) GetSetupConfig() types.SdkConfigSetup
- func (config *Config) WithConfigParser(p types.ConfigParser) *Config
- func (config *Config) WithDBBuilder(b db.Builder) *Config
- func (config *Config) WithEncodingConfigBuilder(b types.EncodingConfigBuilder) *Config
- func (cfg *Config) WithLogger(logger logging.Logger) *Config
- func (config *Config) WithRegistrar(r registrar.Registrar) *Config
- func (config *Config) WithSetupConfig(s types.SdkConfigSetup) *Config
- type ParserData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
func StartParsing(data *ParserData) error
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 ¶
func (config *Config) GetConfigParser() types.ConfigParser
GetConfigParser returns the configuration parser to be used
func (*Config) GetDBBuilder ¶
GetDBBuilder returns the database builder to be used
func (*Config) GetEncodingConfigBuilder ¶
func (config *Config) GetEncodingConfigBuilder() types.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 (config *Config) GetSetupConfig() types.SdkConfigSetup
GetSetupConfig returns the SDK configuration builder to use
func (*Config) WithConfigParser ¶
func (config *Config) WithConfigParser(p types.ConfigParser) *Config
WithConfigParser sets the configuration parser to be used
func (*Config) WithDBBuilder ¶
WithDBBuilder sets the database builder to be used
func (*Config) WithEncodingConfigBuilder ¶
func (config *Config) WithEncodingConfigBuilder(b types.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 (config *Config) WithSetupConfig(s types.SdkConfigSetup) *Config
WithSetupConfig sets the SDK setup configurator to be used
type ParserData ¶
type ParserData struct { EncodingConfig *params.EncodingConfig Proxy *client.Proxy Database db.Database Modules []modules.Module Logger logging.Logger }
ParserData contains the data that should be used to start parsing the chain
func NewParserData ¶
func NewParserData( encodingConfig *params.EncodingConfig, proxy *client.Proxy, db db.Database, modules []modules.Module, logger logging.Logger, ) *ParserData
NewParserData builds a new ParserData instance
func SetupParsing ¶
func SetupParsing(parseConfig *Config) (*ParserData, error)
SetupParsing setups all the things that should be later passed to StartParsing in order to parse the chain data properly.