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
Raw Normal View History

2021-01-06 19:36:09 +00:00
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,
}
}