This boilerplate serves as an example for the Distributed Systems laboratory and it provides the following features:
- RESTful endpoints for users: register, login, get-profile and get-all
- Unit test example
- JWT-based auth
- Error handling
- Structured logging
- Password hashing before storing in SQLite
- CRUD operations on a database table
- Docker deploy (using
docker-compose up -d
)
Uses the following Go packages:
- Web framework: gin
- Database access: gorm
- Database management system: sqlite
- Logging: logrus
- JWT: jwt
The project is designed to aid the development of small to medium size Go projects. Standard Go Project Layout is recommended otherwise.