This repository has been archived on 2023-11-13. You can view files and clone it, but cannot push or open issues or pull requests.
imagini/internal/config/config.go

22 lines
347 B
Go

package config
import (
"reichard.io/imagini/internal/db"
"gorm.io/gorm"
)
type ServerConfig struct {
db *gorm.DB
settings *Settings
}
func NewConfig() {
loadedSettings := loadSettings()
loadedDB := db.OpenDB(&loadedSettings)
newConfig := &Config {
settings: &loadedSettings,
db: &loadedDB,
}
}