-
Notifications
You must be signed in to change notification settings - Fork 9
Generating Store Layer methods based on Yaml files #64
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: main
Are you sure you want to change the base?
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.
Pull Request Overview
This PR adds a comprehensive store layer generator to gofr-cli that generates GoFr-compatible store interfaces and implementations from YAML configuration files. The generator supports multi-store architecture with external model referencing and smart generation features.
- Adds YAML-driven store layer code generation with CRUD operations support
- Implements multi-store architecture allowing multiple isolated stores in a single configuration
- Introduces external model referencing to use existing model files instead of generating new ones
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| store/generator.go | Core generator implementation with YAML parsing, templating, and file generation logic |
| store/example.yaml | Comprehensive example configuration demonstrating multi-store setup with external and generated models |
| store/README.md | Detailed documentation covering features, usage, configuration options, and best practices |
| main.go | Integration of store commands into the CLI application |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@coolwednesday Looks like your PR has some code quality issues: Can we please fix them. |
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
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Add Store Layer Generator to gofr-cli
Pull Request: Enhanced Store Generator & Documentation Overhaul
Overview
Key deliverables:
user,product,order,category) showcasing every query & return type.stores/all.goinit/generate) and multi-store workflowmain.gointegration, registry usage, DI pattern, env overridesHow to Test
gofr store init -name=userthengofr store init -name=product– checkstores/all.goappends without dupes.gofr store generate -config=example.yaml– generates four stores and a clean registry;go vet ./...andgo testsucceed.Backward Compatibility
stores/all.gofiles are preserved—new stores append safely.Next Steps