This is just a personal project I'm using to learn the Go programming language and its libraries.
using different package approaches to validate the better structure for each use case
- configs from environment
- go modules
- GORM atabase models, using UUID as identifiers
- Dockerfile with build layer
- docker-compose for single machine deployment
- JWT Authentication
- Replace GORM for a better solution, without so many abstrations
- improve database migration
- Validate Request Payloads
- better error handling, with "stack trace" build, using errors.Wrap
- metrics using influx and grafana
- > 90% test coverage
- Split domain interface definitions into Reader and Writer actions
APP_TOKEN=aRandomGeneratedString
DB_NAME=databaseName
DB_USER=databaseUsername
DB_PASSWORD=databasePassword
DB_HOST=0.0.0.0
DB_PORT=5432
IMAGE_NAME=dockerRepositoryImage
IMAGE_VERSION=dockerTagVersion
GIN_MODE=release
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/main.go",
"envFile": "${workspaceFolder}/.env",
}
]
}
$ make database
$ docker logs financedb
$ make dev