A little change to pkgdesc. Removed unused fields. Pass a VERSION var to make. Added a v prefix for tag and made use of pkgver. pkgrel was incremented.
v2.0.2
Alexander "Arav" Andreev2023-05-06 04:52:25 +0400
Version updated to 2.0.1. No drastic changes were made. Internal cleaning. Hope it is ready to be correctly used as a library.Alexander "Arav" Andreev2023-01-08 18:36:39 +0400
Handlers are edited to work with modified interfaces. Status codes are changed. Now 404 is not being returned if parameter ?remove was set.Alexander "Arav" Andreev2022-10-20 22:58:14 +0400
db.go. InMemoryCaptchaDB was moved out. ErrorNotFound is now public. And DefaultExpiredScanInterval is now a public const. For more security a string of random data added to the end of a hash.Alexander "Arav" Andreev2022-10-20 22:55:37 +0400
GET / was changed to POST / for a new CAPTCHA creation. And now captcha db is being initialised in handlers.Alexander "Arav" Andreev2022-10-20 22:50:49 +0400
PNG was replaced by JPEG because of smaller image sizes. ~11.5KB for PNG vs just <2KB for JPEG with 20% quality.Alexander "Arav" Andreev2022-08-28 23:30:38 +0400
Added Remove() method. CAPTCHA word is capitalised in comments. In IsSolved() method of a DB a CAPTCHA's IsSolved method is now called within a return statement.Alexander "Arav" Andreev2022-08-28 23:27:54 +0400
Struct's fields made private. expireScanInterval made into a field. SetExpiry() removed. Now go routine for expiry check is in a cleanExpired() private method and being called by a constructor. Implemented a constructor for InMemoryCaptchaDB.Alexander "Arav" Andreev2022-08-19 02:15:34 +0400
captchaDb is now of type CaptchaDB interface. Use a constructor for InMemoryCaptchaDB. A new captcha is now being created here instead of passed as an argument.Alexander "Arav" Andreev2022-08-19 02:09:01 +0400
A function for generating an answer was transformed into a constructor with specified type of integer in its name. maxAnswer constant renamed to maxIntAnswer.Alexander "Arav" Andreev2022-08-17 21:46:10 +0400
ICaptchaDB interface renamed to CaptchaDB. And implementation was renamed to InMemoryCaptchaDB. Composition of sync.Mutex was moved to the top of struct. Methods was rearranged to resemble order from CaptchaDB interface.Alexander "Arav" Andreev2022-07-30 15:39:19 +0400
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.Alexander "Arav" Andreev2022-07-30 15:37:05 +0400
Fixed mutexes. Now program doesn't fall under high load. Seems like an old expiry comparing didn't work as left thousands of expired captchas in a map, so it was replaced by a forgotten by me time.Since() function.Alexander "Arav" Andreev2022-06-27 02:48:55 +0400
Made use of a new style name feature and implemented a dark style, and now by default light version is being rendered.Alexander "Arav" Andreev2022-06-27 01:30:28 +0400
When I moved implementation to pkg directory an error appeared that DwellingCaptcha doesn't implement generateImage() method. And these methods was copied here to resolve this problem. But, actual fix was implementing an empty generateImage() method for base Captcha struct.Alexander "Arav" Andreev2022-06-26 23:57:16 +0400
Methods Solve, GetAnswer, IsSolved, and Expiry could be implemented once for a base Captcha struct. But GetImage and generateImage methods should be implemented by all structs that compose with base Captcha struct.Alexander "Arav" Andreev2022-06-26 22:02:38 +0400