Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var C = &Config{}
C 全局配置变量
Functions ¶
Types ¶
type Config ¶
type Config struct { Debug bool `yaml:"debug" toml:"debug" json:"debug"` //是否是调试模式 Logger logger.Conf `yaml:"logger" toml:"logger" json:"logger"` //日志 DB db.Conf `yaml:"db" toml:"db" json:"db"` //数据库配置 Redis redis.Conf `yaml:"redis" toml:"redis" json:"redis"` //redis配置 JWT jwt.Conf `yaml:"jwt" toml:"jwt" json:"jwt"` //jwt配置 HttpServer HttpServerConf `yaml:"http_server" toml:"http_server" json:"http_server"` //http服务配置 }
Config 整体的配置信息
type HttpServerConf ¶
type HttpServerConf struct {
Addr string `yaml:"addr" toml:"addr" json:"addr" default:":8080"` //监听地址
}
HttpServerConf http服务配置
Click to show internal directories.
Click to hide internal directories.