Commit Graph

15 Commits

Author SHA1 Message Date
Alexander Andreev 073384cc34
ExpiryDate() func was being used in just one place, so it was removed. 2023-01-08 18:21:46 +04:00
Alexander Andreev cc30010d3f
Field expireIn -> expiry. Comments were redacted. 2022-10-20 22:56:28 +04:00
Alexander Andreev 2c22ff00e6
Added comments for BaseCaptcha. Fixed comments for the Captcha interface. 2022-08-29 00:02:58 +04:00
Alexander Andreev 4b0577f1bd
GetAnswer() method changed into Answer(). 2022-08-19 02:24:00 +04:00
Alexander Andreev a2bcff84d8
Fields for BaseCaptcha are made private. NewBaseCaptcha() constructor added. 2022-08-19 02:21:57 +04:00
Alexander Andreev b7ba27b613
Moved Solve() to be in order of an interface. Reduced a comment for BaseCaptcha struct. 2022-08-19 02:11:06 +04:00
Alexander Andreev 59bd479ebe
Image now passed by a pointer instead of value. Hope it will help with memory consumption a little. 2022-08-17 21:47:27 +04:00
Alexander Andreev 18431e0001
A function for generating an answer was transformed into a constructor with specified type of integer in its name. maxAnswer constant renamed to maxIntAnswer. 2022-08-17 21:46:10 +04:00
Alexander Andreev d7a04516e3
Not found error moved to db.go where it belongs. 2022-07-30 15:44:02 +04:00
Alexander Andreev c14f9b0149
ICaptcha interface renamed to Captcha. generateImage() method removed. Instead image is being generated returned by value in Image() method that formely was named a GetImage() method. Base captcha implementation renamed to BaseCaptcha. 2022-07-30 15:37:05 +04:00
Alexander Andreev 96c13ec6b2
Added support for different styles for CAPTCHA. 2022-06-27 01:20:36 +04:00
Alexander Andreev 9ed5ad42e2
generateAnswer() function made into a private. And now being called by GetAnswer() method in Captcha. 2022-06-27 00:44:11 +04:00
Alexander Andreev 10167c4e17
Added comments for ICaptcha interface. 2022-06-27 00:43:12 +04:00
Alexander Andreev 28ceae169b
ID type moved to db.go file where it belongs. 2022-06-27 00:26:03 +04:00
Alexander Andreev 8053952122
Captcha implementation was moved off to pkg directory to be able to be used as an external library. 2022-06-26 23:53:52 +04:00