2
1
Fork 0
Template for gRPC microservice with postgres as a database.
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
dancheg97 0c60356d81
.
2 months ago
cmd moved migrations to code for ease of understanding 3 months ago
gen fixed service name to be go-sqlc of mosy unusual element 3 months ago
migrations added code generators 4 months ago
postgres fixed service name to be go-sqlc of mosy unusual element 3 months ago
services fixed service name to be go-sqlc of mosy unusual element 3 months ago
.drone.yml fixed ci to migrate using cmd command 3 months ago
.gitignore added base stuff for env 4 months ago
.golangci.yml moved migrations to code for ease of understanding 3 months ago
LICENSE updated lincense 2 months ago
Makefile fixed service name to be go-sqlc of mosy unusual element 3 months ago
README.md . 2 months ago
api.proto added code generators 4 months ago
docker-compose.yml moved migrations to code for ease of understanding 3 months ago
dockerfile fixed service name to be go-sqlc of mosy unusual element 3 months ago
go.mod moved migrations to code for ease of understanding 3 months ago
go.sum moved migrations to code for ease of understanding 3 months ago
main.go fixed cmd 4 months ago
sqlc.sql added code generators 4 months ago
sqlc.yml go module inited 4 months ago

README.md

Go gRPC template

Generic badge Generic badge Build Status

Example description.

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Repository stack:

  • goose - write your migrations in sql format and simply add them to /migrations folder in goose compatible format. You can test migrations by running. docker-compose or when generating sqlc code for queries.
  • sqlc - you can simply write your queries for database in sqlc.sql, and they will be automatically generated. sqlc is a compiler, so queries are automatically checked for compatability with provided via migrations database schema.
  • grpc - you can describe your service and messages in proto file code for provided schema will be generated, type safe and fast API. Multiple middleware solutions are included with service.
  • docker - 2 stage dockerfile and clever docker-compose with migrations separated to different container (for optional horizontal scaling of service) are already provided with service.
  • golangci-lint - linter config stored in root directory, already includes a lot of usefull linters, mostly commented with helpful descriptions of different linters. You can tune it for your personal needs.
  • drone - already written pipeline for drone-ci, which includes lint, test, build and pushing service to registry.
  • logrus - one of the most popular libraries for logging in go, has perfect interfaces and adapters for both grpc server and postgres modules.
  • postgres - simply best relational database of all time.