Fork 0
Template containing basic structure for go project, communicating via NATS distributed queue.
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 6584d42ecb
continuous-integration/drone/push Build is passing Details
updated license
2 months ago
cmd changed name to dash-contained 4 months ago
consumer updated tests to use env variables 4 months ago
gen/pb . 4 months ago
producer returned back tests for go 4 months ago
.changelog.yml Initial commit 4 months ago
.drone.yml updated version of golang for ci 4 months ago
.gitignore Initial commit 4 months ago
.golangci.yml . 4 months ago
LICENSE updated license 2 months ago
Makefile removed unused makefile commands 4 months ago
README.md changed name to dash-contained 4 months ago
docker-compose.yml updated template to use cobra-viper cli tooling for proper cli usage 4 months ago
dockerfile corrected dockerfile name 4 months ago
go.mod returned back tests for go 4 months ago
go.sum returned back tests for go 4 months ago
main.go changed name to dash-contained 4 months ago
messages.proto removed unused files from template for nats version 4 months ago


Go NATS 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.
  • proto - you can describe your messages in proto file, code for provided messages will be generated, proto serialization if fast and provides binary format, suitable for NATS.
  • 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.
  • nats - best message broker on the market written in go