refactor code

This commit is contained in:
2024-11-22 17:29:12 +07:00
parent ee03f5401b
commit 79a4456a73
17 changed files with 115 additions and 62 deletions
+16
View File
@@ -24,6 +24,19 @@ var (
LogSaveName: "user",
LogFileExt: "log",
}
OIDCInfo = &model.OIDCModel{
AuthServer: "",
ClientID: "",
ClientSecret: "",
AuthURL: "",
CallbackURL: "",
}
NextWebInfo = &model.NextWebModel{
Server: "",
UserName: "",
Password: "",
EntranceCode: "",
}
Cfg *ini.File
ConfigFilePath string
@@ -60,8 +73,11 @@ func InitSetup(config string, sample string) {
os.Exit(1)
}
mapTo("oidc", OIDCInfo)
mapTo("nextweb", NextWebInfo)
mapTo("common", CommonInfo)
mapTo("app", AppInfo)
}
func SaveSetup(config string) {