Skip to content

always-tired/CRUDL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subscription Aggregator Service

Requirements

  • Go 1.24
  • Docker + Docker Compose

Quick start (Docker)

docker compose --env-file .env up --build

Configuration (ENV only)

The service reads configuration from environment variables.

  • ENV
  • HTTP_PORT
  • HTTP_READ_TIMEOUT
  • HTTP_WRITE_TIMEOUT
  • HTTP_IDLE_TIMEOUT
  • DB_URL
  • LOG_LEVEL

Environment template: .env.example

Migrations (goose)

The migrate service runs goose against the database on startup.

Endpoints

  • POST /subscriptions
  • GET /subscriptions/{id}
  • PUT /subscriptions/{id}
  • DELETE /subscriptions/{id}
  • GET /subscriptions
  • GET /subscriptions/summary?start=MM-YYYY&end=MM-YYYY&user_id=&service_name=

Sample request

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"
  }'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors