isolate repo
This commit is contained in:
parent
0c518cab50
commit
09e3c30cf6
3 changed files with 4 additions and 4 deletions
|
|
@ -8,7 +8,7 @@ import (
|
||||||
type Handler struct {
|
type Handler struct {
|
||||||
controller *controller
|
controller *controller
|
||||||
service *service
|
service *service
|
||||||
repo UserRepo
|
repo userRepo
|
||||||
apiPrefix string
|
apiPrefix string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ func newRepo(db *gorm.DB) *repo {
|
||||||
return &repo{db: db}
|
return &repo{db: db}
|
||||||
}
|
}
|
||||||
|
|
||||||
type UserRepo interface {
|
type userRepo interface {
|
||||||
userCrud
|
userCrud
|
||||||
userAuth
|
userAuth
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,11 @@ import (
|
||||||
|
|
||||||
type service struct {
|
type service struct {
|
||||||
auth interfaces.Auth
|
auth interfaces.Auth
|
||||||
repo UserRepo
|
repo userRepo
|
||||||
utils interfaces.Utils
|
utils interfaces.Utils
|
||||||
}
|
}
|
||||||
|
|
||||||
func newService(auth interfaces.Auth, repo UserRepo, utils interfaces.Utils) *service {
|
func newService(auth interfaces.Auth, repo userRepo, utils interfaces.Utils) *service {
|
||||||
return &service{
|
return &service{
|
||||||
auth: auth,
|
auth: auth,
|
||||||
repo: repo,
|
repo: repo,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue