• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / fuel-prices-api / 22042020363
20%

Build:
DEFAULT BRANCH: main
Ran 15 Feb 2026 07:54PM UTC
Jobs 1
Files 7
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Feb 2026 07:53PM UTC coverage: 0.0%. Remained the same
22042020363

push

github

web-flow
feat: add REST API server and search endpoint (#3)

* feat: add REST API server and search endpoint

Introduces a RESTful API using the `gin` framework and refactors the
application entry point to use `cobra` CLI commands.

*   Implemented `GET /v1/fuel-prices/search` with **bounding box**
    validation.
*   Added `api-server` subcommand to manage service startup.
*   Integrated middleware for `prometheus` metrics, `pprof` profiling,
    `CORS`, and automated health checks.
*   Enabled `HEALTHCHECK` in the `Dockerfile` for container monitoring.
*   Updated data models to include metadata like `attribution` and
    `last_updated` timestamps.

```mermaid
sequenceDiagram
    participant C as Client
    participant A as API (Gin)
    participant R as Repository
    participant F as FuelClient

    C->>A: GET /search?bbox=min_lon,min_lat,max_lon,max_lat
    A->>A: Parse & validate BBox
    alt Invalid BBox
        A-->>C: 400 Bad Request
    else Valid BBox
        A->>R: Search(bbox)
        R-->>A: List of results
        A->>F: LastUpdated()
        F-->>A: Timestamp
        A-->>C: 200 OK (Results + Attribution + UpdatedTime)
    end
```

* fix: improve bounding box validation accuracy

Update `parseBBox` to calculate physical distance in meters rather
than comparing raw degree differences.

- Accounts for longitude shrinkage at higher latitudes using the
  cosine of the average latitude.
- Ensures `MAX_BOUNDS` correctly limits the geographic area in
  physical units.

* go mod tidy

0 of 126 new or added lines in 4 files covered. (0.0%)

0 of 573 relevant lines covered (0.0%)

0.0 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
6
0.0
0.0% internal/client_fetch.go
20
0.0
0.0% main.go
39
0.0
internal/routes/search.go
61
0.0
cmd/api_server.go
Jobs
ID Job ID Ran Files Coverage
1 22042020363.1 15 Feb 2026 07:54PM UTC 7
0.0
GitHub Action Run
Source Files on build 22042020363
  • Tree
  • List 7
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 0b9fe9f2 on github
  • Prev Build on main (#22039057692)
  • Next Build on main (#22042184623)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc