config

package
v0.0.0-...-70addda Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMapStructureTag

func GetMapStructureTag(obj interface{}) []string

Types

type Config

type Config struct {
	LogLevel                     string `mapstructure:"LOG_LEVEL"`
	ServerBindAddr               string `mapstructure:"SERVER_BIND_ADDR"`
	DbHost                       string `mapstructure:"DB_HOST" validate:"required"`
	DbPort                       int    `mapstructure:"DB_PORT" validate:"required"`
	DbName                       string `mapstructure:"DB_NAME" validate:"required"`
	DbUser                       string `mapstructure:"DB_USER" validate:"required"`
	DbPassword                   string `mapstructure:"DB_PASSWORD" validate:"required"`
	EthereumHost                 string `mapstructure:"ETHEREUM_HOST" validate:"required"`
	EthereumBlockInitFrom        int    `mapstructure:"ETHEREUM_BLOCK_INIT_FROM" validate:"required"`
	EthereumBlockWorkerCount     int    `mapstructure:"ETHEREUM_BLOCK_WORKER_COUNT"`
	EthereumBlockConfirmCount    int    `mapstructure:"ETHEREUM_BLOCK_CONFIRM_COUNT"`
	BlockPullIntervalMillisecond int    `mapstructure:"BLOCK_PULL_INTERVAL_MILLISECOND"`
}

func NewConfig

func NewConfig() (config *Config)

func (*Config) GetDsn

func (c *Config) GetDsn() string

Jump to

Keyboard shortcuts

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