udemy-go-web-1/internal/repository/dbrepo/dbrepo.go

20 lines
319 B
Go

package dbrepo
import (
"database/sql"
"go-udemy-web-1/internal/config"
"go-udemy-web-1/internal/repository"
)
type postgresDBRepo struct {
App *config.AppConfig
DB *sql.DB
}
func NewPostgresRepo(conn *sql.DB, a *config.AppConfig) repository.DatabaseRepo {
return &postgresDBRepo{
App: a,
DB: conn,
}
}