Documentation
¶
Index ¶
- func InitLogger()
- func LoadEnv(environment string) error
- func ParseJsonArrayConfig[T any](content []byte) ([]T, error)
- func ParseJsonConfig[T any](content []byte) (*T, error)
- func ReadJsonArrayConfig[T any](filePath string) ([]T, error)
- func ReadJsonConfig[T any](filePath string) (*T, error)
- type ChainFamily
- type Config
- type EventBusConfig
- type IChainConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶
func InitLogger()
func ParseJsonArrayConfig ¶
func ParseJsonConfig ¶
func ReadJsonArrayConfig ¶
func ReadJsonConfig ¶
Types ¶
type ChainFamily ¶
type ChainFamily map[uint64]IChainConfig
type Config ¶
type Config struct {
ConfigPath string `mapstructure:"config_path"`
ConnnectionString string `mapstructure:"database_url"` // Postgres db connection string
ScalarMnemonic string `mapstructure:"scalar_mnemonic"`
EvmPrivateKey string `mapstructure:"evm_private_key"`
BtcPrivateKey string `mapstructure:"btc_private_key"`
ChainConfigs map[string]ChainFamily `mapstructure:"chain_configs"` //Store all valid chain configs
}
var GlobalConfig Config
func (*Config) AddChainConfig ¶
func (c *Config) AddChainConfig(chainConfig IChainConfig)
func (*Config) GetChainConfigById ¶
func (c *Config) GetChainConfigById(chainFamily string, chainId uint64) (IChainConfig, error)
type EventBusConfig ¶
type EventBusConfig struct {
}
type IChainConfig ¶
type IChainConfig interface {
GetId() string //String identifier for the chain for example ethereum-sepolia
GetChainId() uint64 //Integer identifier for the chain for example 11155111
GetFamily() string //Family of the chain for example evm
GetName() string //Name of the chain for example Ethereum Sepolia
}
Click to show internal directories.
Click to hide internal directories.