Service that manages the creation and querying of workouts
- Start local running dynamodb
# must be running docker to run this command
docker-compose up
- Build the service
go build -o workout-management-service
- Run the service
./workout-management-service
- Create a workout
curl -X POST http://localhost:1323/create \
-H "Content-Type: application/json" \
-d '{
"owner": "samir@gmail.com",
"name": "Run The Interval",
"category": "running",
"equipment": {
"name": "Running Equipment",
"description": "If indoors we need a threadmill, if outdoors a good place to run fast for 3 min without interruption"
},
"exercises": [
{
"name": "Warmup",
"description": "20min jog"
},
{
"name": "3 min by 5 interval",
"description": "3min x5 at 5k pace with 1min jog"
},
{
"name": "Cooldown",
"description": "20min cool down"
}
]
}'
- Get a workout
curl -X POST http://localhost:1323/get \
-H "Content-Type: application/json" \
-d '{
"owner": "Samir",
"name": "Run The Interval"
}'