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 {
|
||||
controller *controller
|
||||
service *service
|
||||
repo UserRepo
|
||||
repo userRepo
|
||||
apiPrefix string
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ func newRepo(db *gorm.DB) *repo {
|
|||
return &repo{db: db}
|
||||
}
|
||||
|
||||
type UserRepo interface {
|
||||
type userRepo interface {
|
||||
userCrud
|
||||
userAuth
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ import (
|
|||
|
||||
type service struct {
|
||||
auth interfaces.Auth
|
||||
repo UserRepo
|
||||
repo userRepo
|
||||
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{
|
||||
auth: auth,
|
||||
repo: repo,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue