18 lines
294 B
Go
18 lines
294 B
Go
package infrastructure
|
|
|
|
import (
|
|
"github.com/jackc/pgx/v4/pgxpool"
|
|
"github.com/knadh/koanf"
|
|
)
|
|
|
|
type Context struct {
|
|
Database *pgxpool.Pool
|
|
Config *koanf.Koanf
|
|
}
|
|
|
|
func NewContext(db *pgxpool.Pool, config *koanf.Koanf) *Context {
|
|
return &Context{
|
|
Database: db,
|
|
Config: config,
|
|
}
|
|
}
|