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

rm-hull / dot-block / 23951399368
40%

Build:
DEFAULT BRANCH: main
Ran 03 Apr 2026 03:22PM UTC
Jobs 1
Files 19
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

03 Apr 2026 03:22PM UTC coverage: 40.179% (-3.4%) from 43.612%
23951399368

push

github

web-flow
feat: add automated IP2Location database updates (#96)

* feat: add automated IP2Location database updates

- Introduce `GeoIpLookup` wrapper with `RWMutex` to support
hot-reloading
  of the IP2Location database.
- Add an automated cron job to fetch and reload the database monthly.
- Update `.env.example` to include necessary API tokens.
- Refactor `GetAll` method usage across the codebase.

```mermaid
sequenceDiagram
    participant C as Cron Job
    participant F as Fetcher
    participant G as GeoIpLookup
    participant DB as File System

    C->>F: Run()
    F->>DB: Download latest .BIN file
    C->>G: Reopen()
    G->>DB: Open new .BIN file
    G->>G: Swap DB handles
    G->>G: Close old DB handle
```

* feat: integrate IP2Location auto-update cron job

- Initialize the cron scheduler earlier in the application startup.
- Register the `Ip2LocationUpdaterCronJob` to handle periodic database
  updates.
- Reorder initialization logic to ensure dependencies are available
  before job scheduling.

```mermaid
sequenceDiagram
    participant App
    participant Cron
    participant IP2LocationUpdater

    App->>Cron: New()
    App->>IP2LocationUpdater: New(geoIpLookup)
    App->>Cron: AddJob(schedule, updater)
    Cron->>Cron: Start()
```

* fix: return error when geoblock db is uninitialized

Return a concrete error instead of an empty record
when the database is nil. This prevents silent
failures in services consuming the `GetAll` method.

* docs: add ip2location cron schedule to readme

Document the `--cron-schedule:ip2location` configuration option and its
default monthly execution schedule.

1 of 63 new or added lines in 5 files covered. (1.59%)

51 existing lines in 3 files now uncovered.

495 of 1232 relevant lines covered (40.18%)

0.43 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
0.0
0.0% main.go
6
0.0
0.0% internal/geoblock/update.go
24
0.0
0.0% internal/app.go
31
0.0
internal/geoblock/service.go

Uncovered Existing Lines

Lines Coverage ∆ File
3
0.0
0.0% main.go
16
0.0
0.0% internal/geoblock/update.go
32
0.0
0.0% internal/app.go
Jobs
ID Job ID Ran Files Coverage
1 23951399368.1 03 Apr 2026 03:22PM UTC 19
40.18
GitHub Action Run
Source Files on build 23951399368
  • Tree
  • List 19
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 3e710e62 on github
  • Prev Build on main (#23734030954)
  • 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