diff options
| author | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2026-03-14 14:43:24 -0700 |
|---|---|---|
| committer | Jeff Halter <868228+jhalter@users.noreply.github.com> | 2026-03-14 14:43:24 -0700 |
| commit | 2cf9f33ef42188dd35eaf4905cd2f05557aecca1 (patch) | |
| tree | e2cb7db1ccd7a4defae39395b76b144d66aacf2c /go.mod | |
| parent | 0003a0912b04308fbbdfcb2801d0373e6d4de2f0 (diff) | |
Refactor ban management behind BanMgr interface
Extract ban logic into a BanMgr interface with two implementations:
- BanFile: file-based YAML storage with support for IP, username, and
nickname bans (backwards-compatible with legacy format)
- RedisBanMgr: Redis-backed implementation with permanent and temporary
ban support, using fail-safe deny-on-error behavior
This replaces scattered Redis calls in API handlers, transaction
handlers, and server connection logic with unified interface calls,
removing the Redis dependency from the API server constructor and
enabling ban functionality for both file-only and Redis deployments.
Diffstat (limited to 'go.mod')
| -rw-r--r-- | go.mod | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3,6 +3,7 @@ module github.com/jhalter/mobius go 1.25.4 require ( + github.com/alicebob/miniredis/v2 v2.35.0 github.com/go-playground/validator/v10 v10.28.0 github.com/oleksandr/bonjour v0.0.0-20210301155756-30f43c61b915 github.com/redis/go-redis/v9 v9.17.0 @@ -25,6 +26,7 @@ require ( github.com/miekg/dns v1.1.68 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stretchr/objx v0.5.3 // indirect + github.com/yuin/gopher-lua v1.1.1 // indirect golang.org/x/mod v0.30.0 // indirect golang.org/x/net v0.47.0 // indirect golang.org/x/sync v0.18.0 // indirect |