Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlidayuConfig ¶
type AlidayuConfig struct { AppKey string `toml:"app_key"` AppSecret string `toml:"app_secret"` SignName string `toml:"sign_name"` TemplateCode string `toml:"template_code"` }
AlidayuConfig 短信配置
type DbConfig ¶
type DbConfig struct { Debug bool `toml:"debug"` DbType string `toml:"db_type"` Address string `toml:"address"` Port int `toml:"port"` User string `toml:"user"` Passwd string `toml:"passwd"` DbName string `toml:"db_name"` Prefix string `toml:"prefix"` MaxIdle int `toml:"max_idle"` MaxConn int `toml:"max_conn"` }
DbConfig 数据库配置
type HTTPListenerConfig ¶
type HTTPListenerConfig struct { Enable bool `toml:"enable"` Address string `toml:"address"` Port int `toml:"port"` Timeout Duration `toml:"timeout"` }
HTTPListenerConfig http监听配置
type InfluxdbConfig ¶
type InfluxdbConfig struct { Address string `toml:"address"` Port int `toml:"port"` DbName string `toml:"db_name"` SubDbName string `toml:"sub_db_name"` Username string `toml:"username"` Password string `toml:"password"` Timeout Duration `toml:"timeout"` MaxIdle int `toml:"max_idle"` }
InfluxdbConfig influxdb配置文件
type LoggerConfig ¶
type LoggerConfig struct { Name string `toml:"name"` Verbose bool `toml:"verbose"` SystemLog bool `toml:"system_log"` }
LoggerConfig 日志记录对象配置
type RedisConfig ¶
type RedisConfig struct { Address string `toml:"address"` Port int `toml:"port"` Ping Duration `toml:"ping"` MaxIdle int `toml:"max_idle"` }
RedisConfig redis配置
type SMTPConfig ¶
type SMTPConfig struct { Address string `toml:"address"` Port int `toml:"port"` Username string `toml:"username"` Password string `toml:"password"` From string `toml:"from"` Cc string `toml:"cc"` }
SMTPConfig 短信发送配置
type ServerConfig ¶
type ServerConfig struct { Debug bool `toml:"debug"` Logger *LoggerConfig `toml:"logger"` HTTP *HTTPListenerConfig `toml:"http"` NSQ *NsqConfig `toml:"nsq"` Redis *RedisConfig `toml:"redis"` }
ServerConfig server配置
func NewServerConfig ¶
func NewServerConfig(path string) (*ServerConfig, error)
NewServerConfig 实例化server配置
Click to show internal directories.
Click to hide internal directories.