Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Conf = new(AppConfig)
Functions ¶
Types ¶
type AppConfig ¶
type AppConfig struct { Name string `mapstructure:"name"` Mode string `mapstructure:"mode"` Version string `mapstructure:"version"` StartTime string `mapstructure:"start_time"` MachineID int64 `mapstructure:"machine_id"` Port int `mapstructure:"port"` *LogConfig `mapstructure:"log"` *MySQLConfig `mapstructure:"mysql"` *RedisConfig `mapstructure:"redis"` *UserSrvConfig `mapstructure:"usersrv"` }
AppConfig 需要初始化的项目
type Config ¶
type Config struct { DB Mysql `toml:"mysql"` RDB Redis `toml:"redis"` Server `toml:"server"` Path `toml:"path"` }
var Info Config
Info 全局参数配置
type MySQLConfig ¶
type MySQLConfig struct { Host string `mapstructure:"host"` User string `mapstructure:"user"` Password string `mapstructure:"password"` DB string `mapstructure:"dbname"` Port int `mapstructure:"port"` MaxOpenConns int `mapstructure:"max_open_conns"` MaxIdleConns int `mapstructure:"max_idle_conns"` }
type Path ¶
type Path struct { FfmpegPath string `toml:"ffmpeg_path"` StaticSourcePath string `toml:"static_source_path"` }
Path ffmpeg_path和static_path
type RedisConfig ¶
type UserSrvConfig ¶
Click to show internal directories.
Click to hide internal directories.