Different use case
theobouwman opened this issue · 5 comments
Hello,
I am trying to implement this structure for a new project.
What I first tried was creating a listing
and register
service for users.
But I am getting to the point where I want to GetAUserByEmail
in order to check if a user is already registered with that email.
So should I use the listing
.GetUserByEmail
in the register
service or definitely not?
Like here:
- clone
https://gitlab.com/theobouwman98/wp/tree/hex-impl
- run
go run cmd/register-server/main.go
What would be a good fix for this.
Thanks in advance.
@katzien ?
Hi @theobouwman!
I can't access your link (needs me to sign in), but it sounds like maybe you should have a users
module which would provide a GetUserByEmail
function which can then be used by both listing
and register
? That's all I can say without knowing what your project is about :)
Thanks. Found another solution!
What did you end up doing? :)
Well, I am using the service repository pattern right now.