Added GetExpireInterval() method to DB.
This commit is contained in:
parent
f0ced332e8
commit
c5d159531c
@ -17,6 +17,7 @@ type ICaptchaDB interface {
|
|||||||
Image(id ID) (*image.Image, error)
|
Image(id ID) (*image.Image, error)
|
||||||
Solve(id ID, answer Answer) (bool, error)
|
Solve(id ID, answer Answer) (bool, error)
|
||||||
IsSolved(id ID) bool
|
IsSolved(id ID) bool
|
||||||
|
GetExpireInterval() time.Duration
|
||||||
}
|
}
|
||||||
|
|
||||||
type CaptchaDB struct {
|
type CaptchaDB struct {
|
||||||
@ -102,3 +103,7 @@ func (cdb *CaptchaDB) IsSolved(id ID) (bool, error) {
|
|||||||
}
|
}
|
||||||
return false, errorNotFound
|
return false, errorNotFound
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (cdb *CaptchaDB) GetExpireInterval() time.Duration {
|
||||||
|
return cdb.ExpireInterval
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user