Add secret key

This commit is contained in:
Eden Kirin
2023-10-23 23:41:46 +02:00
parent 002f6a3d06
commit 71e09a86f6
5 changed files with 50 additions and 1 deletions

View File

@ -18,6 +18,7 @@ type configStruct struct {
Password string `yaml:"password" json:"-"`
} `yaml:"database"`
Application struct {
SecretKey string `yaml:"secretKey" json:"-"`
LogLevel string `yaml:"logLevel"`
LogFile string `yaml:"logFile"`
Debug bool `yaml:"debug"`
@ -81,6 +82,7 @@ func Init() {
maskedCfg := Config
maskedCfg.Database.Password = "**password hidden**"
maskedCfg.SMTP.Password = "**password hidden**"
maskedCfg.Application.SecretKey = "**secret key hidden**"
fmt.Println("--- CONFIG -------------------------------")
fmt.Println(maskedCfg)

View File

@ -1,7 +1,10 @@
// Package main an example on how to naming your routes & use the custom 'url path' Jet Template Engine.
package main
import (
"iris-test/app/cfg"
"iris-test/app/db"
"iris-test/app/logging"
"github.com/kataras/iris/v12"
)
@ -35,6 +38,10 @@ var users = []User{
}
func main() {
cfg.Init()
logging.Init()
db.InitDB()
app := iris.New()
app.RegisterView(iris.Jet("./app/templates", ".jet").Reload(true))