This repository has been archived on 2023-11-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
imagini/internal/config/config.go
2021-01-06 14:36:09 -05:00

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,
}
}