config: fixed app_mode
also changed like Ip to IP and Db to DB
This commit is contained in:
parent
e9e84ea076
commit
8220eacb10
2 changed files with 11 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
|||
AppMode = "production" #Anything != production will show DEBUG messages
|
||||
app_mode = "production" #Anything != production will show DEBUG messages
|
||||
|
||||
[App]
|
||||
IP = ""
|
||||
|
@ -11,12 +11,12 @@ IP = "127.0.0.1"
|
|||
Username = "sacrebleu"
|
||||
Password = "superSecretPassword"
|
||||
Port = "3306"
|
||||
Db = "sacrebleudatabase"
|
||||
DB = "sacrebleudatabase"
|
||||
Type = "mysql" #postgresql or mysql
|
||||
|
||||
[Redis]
|
||||
IP = "127.0.0.1"
|
||||
Port = 6379
|
||||
Password = ""
|
||||
Db = 0
|
||||
Ttl = 10 #In seconds
|
||||
DB = 0
|
||||
TTL = 10 #In seconds
|
||||
|
|
|
@ -3,33 +3,33 @@ package utils
|
|||
//App : Struct for App (dns server) configuration in the config.ini file
|
||||
type App struct {
|
||||
Port int
|
||||
IP string
|
||||
IP string `ini:"IP"`
|
||||
Logdir string
|
||||
Logfile bool
|
||||
}
|
||||
|
||||
//Database : Struct for SQL Database configuration in the config.ini file
|
||||
type Database struct {
|
||||
IP string
|
||||
IP string `ini:"IP"`
|
||||
Port string
|
||||
Username string
|
||||
Password string
|
||||
Db string
|
||||
Db string `ini:"DB"`
|
||||
Type string
|
||||
}
|
||||
|
||||
//Redis : Struct for Redis Database configuration in the config.ini file
|
||||
type Redis struct {
|
||||
IP string
|
||||
IP string `ini:"IP"`
|
||||
Port int
|
||||
Password string
|
||||
Db int
|
||||
TTL int
|
||||
Db int `ini:"DB"`
|
||||
TTL int `ini:"TTL"`
|
||||
}
|
||||
|
||||
//Conf : Struct for the whole config.ini file when it will be parsed by go-ini
|
||||
type Conf struct {
|
||||
AppMode string
|
||||
AppMode string `ini:"app_mode"`
|
||||
App
|
||||
Database
|
||||
Redis
|
||||
|
|
Loading…
Reference in a new issue