feat: Set up project scaffolding with Docker Compose, Gin webserver, and Redis #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Development Setup
This should work. I already set up live reload with Docker too so when you make changes to the server, it should be reflected during development.
Let me know if you'd like to make the server work without Docker Compose. I think we may need to add some code to read environment variables and that's about it.
Business logic directories
Besides the boilerplate setup code, the meat of the project should probably be in the business logic packages like
destination
,tenant
,event
, etc. Currently, I have things pretty flat, everything is insideinternal
and that's it. If you think it makes sense, I can try to organize the packages a bit so there's a better differentiation between glue code and business logic.CRUD ops
Please check out
destination/handlers.go
to see the CRUD operations. I think one potential missing thing is how we want to treat errors. I don't see that in the design document yet, so I'm just returning the status code for now. If we have a certain error format, we can potentially write a helper to transform Go err into that structure.Postman
Here's the Postman Collections I have for this so far, just in case it helps.
EventKit.postman_collection.json