types

package
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: CC0-1.0 Imports: 15 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigSetup

func DefaultConfigSetup(cfg config.Config, sdkConfig *sdk.Config)

DefaultConfigSetup represents a handy implementation of SdkConfigSetup that simply setups the prefix inside the configuration

func GetParserContext

func GetParserContext(cfg config.Config, parseConfig *Config) (*parser.Context, error)

GetParserContext setups all the things that can be used to later parse the chain state

func ReadConfig

func ReadConfig(cfg *Config) (config.Config, error)

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

func UpdatedGlobalCfg(cfg *Config) error

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 NewConfig

func NewConfig() *Config

NewConfig allows to build a new Config instance

func (*Config) GetConfigParser

func (cfg *Config) GetConfigParser() config.Parser

GetConfigParser returns the configuration parser to be used

func (*Config) GetDBBuilder

func (cfg *Config) GetDBBuilder() database.Builder

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) GetLogger

func (cfg *Config) GetLogger() logging.Logger

GetLogger returns the logger to be used when parsing the data

func (*Config) GetRegistrar

func (cfg *Config) GetRegistrar() registrar.Registrar

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

func (cfg *Config) WithConfigParser(p config.Parser) *Config

WithConfigParser sets the configuration parser to be used

func (*Config) WithDBBuilder

func (cfg *Config) WithDBBuilder(b database.Builder) *Config

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

func (cfg *Config) WithLogger(logger logging.Logger) *Config

WithLogger sets the logger to be used while parsing the data

func (*Config) WithRegistrar

func (cfg *Config) WithRegistrar(r registrar.Registrar) *Config

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 EncodingConfigBuilder

type EncodingConfigBuilder func() params.EncodingConfig

EncodingConfigBuilder represents a function that is used to return the proper encoding config.

type SdkConfigSetup

type SdkConfigSetup func(config config.Config, sdkConfig *sdk.Config)

SdkConfigSetup represents a method that allows to customize the given sdk.Config. This should be used to set custom Bech32 addresses prefixes and other app-related configurations.

Jump to

Keyboard shortcuts

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