summaryrefslogtreecommitdiffci
path: root/config/config.go
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
authorGravatar SayaAndy <saya.andy@posteo.com> 2025-08-30 00:36:46 +0700
committerGravatar SayaAndy <saya.andy@posteo.com> 2025-08-30 00:36:46 +0700
commit78fe4481099fcf6666f1a259e38d9d828a253347 (patch)
treec4f8bc344da8a26536fb85d5fb3fec891bdf7eb6 /config/config.go
parent753fe7f1d5bf837a85481425bd6bf6b431ffb611 (diff)
downloadweb-78fe4481099fcf6666f1a259e38d9d828a253347.tar.gz
web-78fe4481099fcf6666f1a259e38d9d828a253347.zip
feat: add persistent storage for likes
Diffstat (limited to 'config/config.go')
-rw-r--r--config/config.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/config/config.go b/config/config.go
index fe0ac72..7438fe1 100644
--- a/config/config.go
+++ b/config/config.go
@@ -41,7 +41,17 @@ type AvailableLanguageConfig struct {
}
type AuthConfig struct {
- Salt string `json:"Salt" yaml:"salt" validate:"required"`
+ Salt string `json:"Salt" yaml:"salt" validate:"required"`
+ Db DbConfig `json:"Db" yaml:"db" validate:"required"`
+}
+
+type DbConfig struct {
+ Type string `json:"Type" yaml:"type" validate:"required,oneof=sqlite3"`
+ Cfg Sqlite3Config `json:"Config" yaml:"config"`
+}
+
+type Sqlite3Config struct {
+ DSN string `json:"DSN" yaml:"dsn" validate:"required"`
}
func LoadConfig(path string, config *Config) error {