From c5d159531c3732963d3508e00a34b87b954efeb0 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 26 Jun 2022 15:44:41 +0400 Subject: [PATCH] Added GetExpireInterval() method to DB. --- internal/captcha/db.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/captcha/db.go b/internal/captcha/db.go index 14df7f8..7342cbf 100644 --- a/internal/captcha/db.go +++ b/internal/captcha/db.go @@ -17,6 +17,7 @@ type ICaptchaDB interface { Image(id ID) (*image.Image, error) Solve(id ID, answer Answer) (bool, error) IsSolved(id ID) bool + GetExpireInterval() time.Duration } type CaptchaDB struct { @@ -102,3 +103,7 @@ func (cdb *CaptchaDB) IsSolved(id ID) (bool, error) { } return false, errorNotFound } + +func (cdb *CaptchaDB) GetExpireInterval() time.Duration { + return cdb.ExpireInterval +}