feat: complete API-driven projects with infrastructure and business acceptance
This commit is contained in:
14
examples/userService/internal/service/user/getUser.go
Normal file
14
examples/userService/internal/service/user/getUser.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package user
|
||||
|
||||
import (
|
||||
"context"
|
||||
"example.com/userService/internal/types"
|
||||
)
|
||||
|
||||
func (s *Service) GetUser(ctx context.Context, req *types.UserIDReq) (*types.UserResp, error) {
|
||||
u, err := s.deps.Users.Get(ctx, req.ID)
|
||||
if err != nil {
|
||||
return nil, s.failure(ctx, err)
|
||||
}
|
||||
return response(u), nil
|
||||
}
|
||||
Reference in New Issue
Block a user