- Go 1.24
- Docker + Docker Compose
docker compose --env-file .env up --build- API: http://localhost:8080
- Swagger UI: http://localhost:8080/swagger-ui.html
- Swagger JSON: http://localhost:8080/swagger/doc.json
The service reads configuration from environment variables.
ENVHTTP_PORTHTTP_READ_TIMEOUTHTTP_WRITE_TIMEOUTHTTP_IDLE_TIMEOUTDB_URLLOG_LEVEL
Environment template: .env.example
The migrate service runs goose against the database on startup.
POST /subscriptionsGET /subscriptions/{id}PUT /subscriptions/{id}DELETE /subscriptions/{id}GET /subscriptionsGET /subscriptions/summary?start=MM-YYYY&end=MM-YYYY&user_id=&service_name=
curl -X POST http://localhost:8080/subscriptions \
-H 'Content-Type: application/json' \
-d '{
"service_name": "Yandex Plus",
"price": 400,
"user_id": "60601fee-2bf1-4721-ae6f-7636e79a0cba",
"start_date": "07-2025"
}'