summaryrefslogtreecommitdiffstats
path: root/modules/base/conf.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/base/conf.go')
-rw-r--r--modules/base/conf.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/base/conf.go b/modules/base/conf.go
index 863daca644..8c6ee62818 100644
--- a/modules/base/conf.go
+++ b/modules/base/conf.go
@@ -44,6 +44,9 @@ var (
CacheAdapter string
CacheConfig string
+ PictureService string
+ PictureRootPath string
+
LogMode string
LogConfig string
)
@@ -52,6 +55,7 @@ var Service struct {
RegisterEmailConfirm bool
DisenableRegisteration bool
RequireSignInView bool
+ EnableCacheAvatar bool
ActiveCodeLives int
ResetPwdCodeLives int
}
@@ -82,6 +86,7 @@ func newService() {
Service.ResetPwdCodeLives = Cfg.MustInt("service", "RESET_PASSWD_CODE_LIVE_MINUTES", 180)
Service.DisenableRegisteration = Cfg.MustBool("service", "DISENABLE_REGISTERATION", false)
Service.RequireSignInView = Cfg.MustBool("service", "REQUIRE_SIGNIN_VIEW", false)
+ Service.EnableCacheAvatar = Cfg.MustBool("service", "ENABLE_CACHE_AVATAR", false)
}
func newLogService() {
@@ -214,6 +219,9 @@ func NewConfigContext() {
SecretKey = Cfg.MustValue("security", "SECRET_KEY")
RunUser = Cfg.MustValue("", "RUN_USER")
+ PictureService = Cfg.MustValue("picture", "SERVICE")
+ PictureRootPath = Cfg.MustValue("picture", "PATH")
+
// Determine and create root git reposiroty path.
RepoRootPath = Cfg.MustValue("repository", "ROOT")
if err = os.MkdirAll(RepoRootPath, os.ModePerm); err != nil {