Simple REST API TODO application written using Clean Architecture principles
List of used libraries:
- logrus for logging
- gin web framework
- cleanenv for reading config
- sqlx for working with DB
- testify for testing (mock, require, suite)
- go-sqlmock for database mocking
- redis-mock for redis mocking
- golang-jwt/jwt for JWT auth
#for confirm registration
EMAIL=confirmemail@gmail.com
EMAIL_PASSWORD=email_password
DOMAIN=site_domain
APP_ADDR=bind_addr
APP_PORT=bind_port
#db addr for migration
MIGRATE_DB_HOST=migrate_db_addr
#database
POSTGRES_HOST=todo_db
POSTGRES_PORT=5433
POSTGRES_USER=admin
POSTGRES_PASSWORD=admin
POSTGRES_DB=todo
#jwt keys
JWT_ACCESS_KEY=access_key
JWT_REFRESH_KEY=refresh_key
#redis
REDIS_HOST=tokendb
REDIS_PORT=6380
#other
MAX_LOGGED_IN=6
make rebuild
make migrateup
make migratedown
make test #unit testing
make test.integrations #integration testing
Install swag
make swag #generate docs
See /swagger/index.html
path.