feat: 增加sqlite 支持

This commit is contained in:
rikugun
2020-04-12 11:19:28 +08:00
parent 3ebbd7690f
commit 47a45e2d67
5 changed files with 51 additions and 2 deletions
+10
View File
@@ -2,6 +2,7 @@ package config
type Server struct {
Mysql Mysql `mapstructure:"mysql" json:"mysql"`
Sqlite Sqlite `mapstructure:"sqlite" json:"sqlite"`
Qiniu Qiniu `mapstructure:"qiniu" json:"qiniu"`
Casbin Casbin `mapstructure:"casbin" json:"casbin"`
Redis Redis `mapstructure:"redis" json:"redis"`
@@ -15,6 +16,7 @@ type System struct {
UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint"`
Env string `mapstructure:"env" json:"env"`
Addr int `mapstructure:"addr" json:"addr"`
Db string `mapstructure:"db" json:"db"`
}
type JWT struct {
@@ -58,3 +60,11 @@ type Log struct {
Stdout string `mapstructure:"stdout" json:"stdout"`
File string `mapstructure:"file" json:"file"`
}
type Sqlite struct {
Username string `mapstructure:"username" json:"username"`
Password string `mapstructure:"password" json:"password"`
Path string `mapstructure:"path" json:"path"`
Config string `mapstructure:"config" json:"config"`
LogMode bool `mapstructure:"log-mode" json:"logMode"`
}