initial commit
This commit is contained in:
commit
f48fa210bb
49 changed files with 4058 additions and 0 deletions
13
pkg/db/lockout.go
Normal file
13
pkg/db/lockout.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// Copyright (C) 2022 Marius Schellenberger
|
||||
|
||||
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