Web server for checking internet resource availability with PDF report generation
Check link availability
Request:
{
"links": ["google.com", "malformedlink.gg"]
}Response:
{
"links": {
"google.com": "available",
"malformedlink.gg": "not available"
},
"links_num": 1
}Generate PDF report by batch numbers
Request:
{
"links_list": [1, 2]
}Response: PDF file with report
Service health check
Response:
{
"status": "healthy",
"shutdown": false,
"batches": 5,
"timestamp": 1765108565
}- Go 1.21 or higher
go mod tidygo run main.goThe service will be available on port 8080
curl -X POST http://localhost:8080/api/check \
-H "Content-Type: application/json" \
-d '{"links": ["google.com", "github.com", "nonexistent.example"]}'curl -X POST http://localhost:8080/api/report \
-H "Content-Type: application/json" \
-d '{"links_list": [1, 2]}' \
--output report.pdfcurl http://localhost:8080/api/health./test-coverage.shCurrent coverage: 85.9%
- Database: 82.4%
- Service: 89.3%
- Handlers: 84.8%
This project is distributed under the MIT License.