WIP
This commit is contained in:
21
internal/context/context.go
Normal file
21
internal/context/context.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package context
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"reichard.io/imagini/internal/query"
|
||||
"reichard.io/imagini/internal/config"
|
||||
)
|
||||
|
||||
type ImaginiContext struct {
|
||||
DB *gorm.DB
|
||||
Config *config.Config
|
||||
}
|
||||
|
||||
func NewImaginiContext() *ImaginiContext {
|
||||
c := config.NewConfig()
|
||||
gormDB := query.NewDB(c)
|
||||
return &ImaginiContext{
|
||||
DB: gormDB,
|
||||
Config: c,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user