Generating Store Layer methods based on Yaml files #64
Generating Store Layer methods based on Yaml files #64coolwednesday merged 12 commits intogofr-dev:mainfrom
Conversation
There was a problem hiding this comment.
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.
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