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

rm-hull / fuel-prices-api / 22040541951

15 Feb 2026 06:07PM UTC coverage: 0.0%. Remained the same
22040541951

Pull #3

github

rm-hull
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
```
Pull Request #3: feat: add REST API server and search endpoint

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

0 of 569 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/cmd/api_server.go


Source Not Available

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