Create redis session engine
This commit is contained in:
@ -10,13 +10,6 @@ import (
|
||||
)
|
||||
|
||||
type configStruct struct {
|
||||
Database struct {
|
||||
Host string `yaml:"host"`
|
||||
Port string `yaml:"port"`
|
||||
Name string `yaml:"name"`
|
||||
Username string `yaml:"username"`
|
||||
Password string `yaml:"password" json:"-"`
|
||||
} `yaml:"database"`
|
||||
Application struct {
|
||||
SecretKey string `yaml:"secretKey" json:"-"`
|
||||
LogLevel string `yaml:"logLevel"`
|
||||
@ -27,6 +20,21 @@ type configStruct struct {
|
||||
IsProduction bool `yaml:"isProduction"`
|
||||
LoopDelay uint32 `yaml:"loopDelay"`
|
||||
} `yaml:"application"`
|
||||
Database struct {
|
||||
Host string `yaml:"host"`
|
||||
Port string `yaml:"port"`
|
||||
Name string `yaml:"name"`
|
||||
Username string `yaml:"username"`
|
||||
Password string `yaml:"password" json:"-"`
|
||||
} `yaml:"database"`
|
||||
Redis struct {
|
||||
Host string `yaml:"host"`
|
||||
Port int `yaml:"port"`
|
||||
Username string `yaml:"username"`
|
||||
Password string `yaml:"password" json:"-"`
|
||||
Database string `yaml:"database"`
|
||||
Prefix string `yaml:"prefix"`
|
||||
} `yaml:"redis"`
|
||||
SMTP struct {
|
||||
Host string `yaml:"host"`
|
||||
Port int `yaml:"port"`
|
||||
@ -81,6 +89,7 @@ func Init() {
|
||||
|
||||
maskedCfg := Config
|
||||
maskedCfg.Database.Password = "**password hidden**"
|
||||
maskedCfg.Redis.Password = "**password hidden**"
|
||||
maskedCfg.SMTP.Password = "**password hidden**"
|
||||
maskedCfg.Application.SecretKey = "**secret key hidden**"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user