config

package
v0.0.0-...-4f62844 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MulanPSL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCfg

func InitCfg(conf interface{}) error

func InitCfgFile

func InitCfgFile(conf interface{}, file string) error

func ParseJsonConfigFile

func ParseJsonConfigFile(config string, conf interface{}) error

通用的解析Json文件转换为相应类的方法

Types

type Config

type Config struct {
	ChainRpc       string `json:"chainrpc"`
	Mysql          string `json:"mysql"`
	ShowSql        bool   `json:"showsql"`
	Loglevel       string `json:"loglevel"`
	SyncStartBlock int64  `json:"syncstartblock"`
}

Jump to

Keyboard shortcuts

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