]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/ban.go
Wrap file transfer errors with more context
[rbdr/mobius] / hotline / ban.go
index 0b75e8ee3e732a194b33c28c50039b3c095af112..7a9fd31a41dcae251c30708fe113521ee422efa9 100644 (file)
@@ -2,4 +2,10 @@ package hotline
 
 import "time"
 
-const tempBanDuration = 30 * time.Minute
+// BanDuration is the length of time for temporary bans.
+const BanDuration = 30 * time.Minute
+
+type BanMgr interface {
+       Add(ip string, until *time.Time) error
+       IsBanned(ip string) (bool, *time.Time)
+}