initial
This commit is contained in:
parent
781d525d72
commit
8c38107ff2
5 changed files with 86 additions and 0 deletions
25
internal/merch/handler.go
Normal file
25
internal/merch/handler.go
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package merch
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
type Handler struct {
|
||||
controller *controller
|
||||
}
|
||||
|
||||
type Deps struct {
|
||||
DB *sql.DB
|
||||
Group *gin.RouterGroup
|
||||
}
|
||||
|
||||
func New(db *sql.DB) *Handler {
|
||||
r := newRepo(db)
|
||||
s := newService(r)
|
||||
c := newController(s)
|
||||
|
||||
return &Handler{
|
||||
controller: c,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue