Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitConfig ¶
func InitConfig(filename string)
Types ¶
type Config ¶
type Config struct { Env string `yaml:"Env"` // 环境:prod、dev BaseUrl string `yaml:"BaseUrl"` // base url Port string `yaml:"Port"` // 端口 LogFile string `yaml:"LogFile"` // 日志文件 ShowSql bool `yaml:"ShowSql"` // 是否显示日志 StaticPath string `yaml:"StaticPath"` // 静态文件目录 MySqlUrl string `yaml:"MySqlUrl"` // 数据库连接地址 // Github Github struct { ClientID string `yaml:"ClientID"` ClientSecret string `yaml:"ClientSecret"` } `yaml:"Github"` // 阿里云oss配置 AliyunOss struct { Host string `yaml:"Host"` Bucket string `yaml:"Bucket"` Endpoint string `yaml:"Endpoint"` AccessId string `yaml:"AccessId"` AccessSecret string `yaml:"AccessSecret"` } `yaml:"AliyunOss"` // smtp Smtp struct { Addr string `yaml:"Addr"` Port string `yaml:"Port"` Username string `yaml:"Username"` Password string `yaml:"Password"` } `yaml:"Smtp"` }
var Conf *Config
Click to show internal directories.
Click to hide internal directories.