Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConfiguration ¶
Types ¶
type Config ¶
type Config struct { AppName string Address string Port string DbusPort string `mapstructure:"dbus_port"` AsyncProcess bool `mapstructure:"async_process"` MissionRetryNumber int `mapstructure:"mission_retry_number"` DatabaseDriver string `mapstructure:"database_driver"` MySQL MySQLConfig //需要定义子类型对应的变量,如果不定义映射不成功 SQLite SQLiteConfig //需要定义子类型对应的变量,如果不定义映射不成功 HA ha }
Config对象和config.toml文件保持一致
var CONFIG *Config
type MySQLConfig ¶ added in v0.0.3
type MySQLConfig struct { Ip string //公有访问 Port string User string Password string Database string MaxIdleConnection int `mapstructure:"max_idle_connection"` MaxOpenConnection int `mapstructure:"max_open_connection"` }
func (*MySQLConfig) IsEmpty ¶ added in v0.0.3
func (this *MySQLConfig) IsEmpty() bool
type SQLiteConfig ¶ added in v0.0.3
type SQLiteConfig struct { File string Database string MaxIdleConnection int `mapstructure:"max_idle_connection"` MaxOpenConnection int `mapstructure:"max_open_connection"` }
func (*SQLiteConfig) IsEmpty ¶ added in v0.0.3
func (this *SQLiteConfig) IsEmpty() bool
Click to show internal directories.
Click to hide internal directories.