blog/bootstrap/bootstrap.go

43 lines
872 B
Go

package bootstrap
var Config bootstrap
type bootstrap struct {
Profile string `yaml:"profile"`
Iris iris `yaml:"iris"`
Database database `yaml:"database"`
}
// =========================================================
type iris struct {
Port int `yaml:"port"`
Session session `yaml:"session"`
}
type session struct {
Address string `yaml:"address"`
Expires int `yaml:"expires"`
Password string `yaml:"password"`
Db string `yaml:"db"`
Prefix string `yaml:"prefix"`
}
//=========================================================
type database struct {
Redis redis `yaml:"redis"`
Sqlite sqlite `yaml:"sqlite"`
}
type redis struct {
Addr string `yaml:"addr"`
Db int `yaml:"db"`
Password string `yaml:"password"`
}
type sqlite struct {
BlogPath string `yaml:"blogPath"`
FilePath string `yaml:"filePath"`
}