isolate repo

This commit is contained in:
nquidox 2025-09-15 14:19:31 +03:00
parent 0c518cab50
commit 09e3c30cf6
3 changed files with 4 additions and 4 deletions

View file

@ -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
} }

View file

@ -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
} }

View file

@ -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,