Added: creating database, sql tx repository

This commit is contained in:
Oliwier Adamczyk
2025-10-04 15:11:20 +02:00
parent 1aa78d10c5
commit fdd1c98e75
10 changed files with 159 additions and 1 deletions

25
internal/config/setup.go Normal file
View File

@@ -0,0 +1,25 @@
package config
import (
"encoding/json"
"os"
)
type AppConfig struct {
SqlTablesDir string `json:"sql-tables-dir"`
}
var appConfigInstance *AppConfig
func Setup() {
file, err := os.ReadFile("config.json")
if err != nil {
panic(err)
}
if err = json.Unmarshal(file, &appConfigInstance); err != nil {
panic(err)
}
}
func GetAppConfig() *AppConfig { return appConfigInstance }