From ff4f1a2422b3e02917af1f1786ff5b3ac09565ef Mon Sep 17 00:00:00 2001 From: lost+skunk Date: Sat, 6 Jul 2024 20:06:04 +0300 Subject: Реки и копирование темплейтов в озу MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config.go | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'app/config.go') diff --git a/app/config.go b/app/config.go index 1df6aaf..18cea29 100644 --- a/app/config.go +++ b/app/config.go @@ -7,19 +7,21 @@ import ( ) type cache_config struct { - Enabled bool - Path string - MaxSize int64 `json:"max-size"` - Lifetime int64 + Enabled bool + Path string + MaxSize int64 `json:"max-size"` + Lifetime int64 + UpdateInterval int64 `json:"update-interval"` } type config struct { - cfg string - Listen string - BasePath string `json:"base-path"` - Cache cache_config - Proxy, Nsfw bool - WixmpProxy string `json:"wixmp-proxy"` + cfg string + Listen string + BasePath string `json:"base-path"` + Cache cache_config + Proxy, Nsfw bool + WixmpProxy string `json:"wixmp-proxy"` + TemplatesDir string `json:"templates-dir"` } var CFG = config{ @@ -27,11 +29,13 @@ var CFG = config{ Listen: "127.0.0.1:3003", BasePath: "/", Cache: cache_config{ - Enabled: true, - Path: "cache", + Enabled: true, + Path: "cache", + UpdateInterval: 1, }, - Proxy: true, - Nsfw: true, + TemplatesDir: "html", + Proxy: true, + Nsfw: true, } func ExecuteConfig() { -- cgit v1.2.3