-
Notifications
You must be signed in to change notification settings - Fork 3
Initialise CRUD routes for user service #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Initialise CRUD routes for user service #3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR establishes a clean microservice architecture for the user service by implementing basic CRUD operations following a layered design pattern. The implementation provides a foundation that can be reused across other microservices in the system.
- Implements complete CRUD API endpoints for user management (create, read, update, delete)
- Establishes a clean separation of concerns with handlers, repositories, models, and routers
- Replaces stub authentication endpoints with proper database-backed user operations
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 10 comments.
Show a summary per file
File | Description |
---|---|
services/user/internal/routers/user_routes.go | Defines REST API routes for user CRUD operations |
services/user/internal/repositories/user_repository.go | Implements database operations using GORM with proper error handling |
services/user/internal/models/user.go | Defines User model with GORM annotations for database mapping |
services/user/internal/handlers/user_crud_handler.go | Implements HTTP handlers for CRUD operations with JSON serialization |
services/user/go.mod | Adds GORM and PostgreSQL driver dependencies |
services/user/cmd/server/main.go | Updates main server to use new CRUD handlers and database connection |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adds microservice folder structure and implements basic CRUD API as follows:
Feel free to comment on this structure (since we will likely reuse it for other microservices as well).