single db with prefixes, dump/restore, blacklisting on user deletion
This commit is contained in:
parent
62ff59957a
commit
d4971cda89
20 changed files with 264 additions and 163 deletions
11
pkg/db/lockout.go
Normal file
11
pkg/db/lockout.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
package db
|
||||
|
||||
const lockoutPrefix = "lockout/"
|
||||
|
||||
func (db *DB) lockout(username, created string) error {
|
||||
return db.store.Set(lockoutPrefix+username+created, nil)
|
||||
}
|
||||
|
||||
func (db *DB) LockedOut(username, created string) bool {
|
||||
return db.store.Get(lockoutPrefix+username+created, nil) == nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue