Versions in this module Expand all Collapse all v1 v1.0.0 Sep 7, 2020 Changes in this version + const CaptchaComplexHigh + const CaptchaComplexLower + const CaptchaComplexMedium + const CaptchaModeAlphabet + const CaptchaModeArithmetic + const CaptchaModeChinese + const CaptchaModeNumber + const CaptchaModeNumberAlphabet + const CaptchaModeUseSequencedCharacters + const DefaultLen + const DotCount + const FileExtCaptchaAudio + const FileExtCaptchaImage + const MaxSkew + const MimeTypeCaptchaAudio + const MimeTypeCaptchaImage + const TxtAlphabet + const TxtChineseCharaters + const TxtNumbers + const TxtSimpleCharaters + var Expiration = 10 * time.Minute + var GCLimitNumber = 10240 + func Asset(name string) ([]byte, error) + func AssetDir(name string) ([]string, error) + func AssetNames() []string + func CaptchaWriteToBase64Encoding(cap CaptchaInterface) string + func CaptchaWriteToFile(cap CaptchaInterface, outputDir, fileName, fileExt string) error + func SetCustomStore(s store.Store) + func VerifyCaptcha(identifier, verifyValue string) bool + func VerifyCaptchaAndIsClear(identifier, verifyValue string, isClear bool) bool + type Audio struct + func EngineAudioCreate(id string, config ConfigAudio) *Audio + func (a *Audio) BinaryEncoding() []byte + func (a *Audio) WriteTo(w io.Writer) (n int64, err error) + type CaptchaImageChar struct + Complex int + func EngineCharCreate(config ConfigCharacter) *CaptchaImageChar + func (captcha *CaptchaImageChar) BinaryEncoding() []byte + func (captcha *CaptchaImageChar) WriteTo(w io.Writer) (int64, error) + type CaptchaImageDigit struct + func EngineDigitsCreate(id string, config ConfigDigit) *CaptchaImageDigit + func (m *CaptchaImageDigit) BinaryEncoding() []byte + func (m *CaptchaImageDigit) WriteTo(w io.Writer) (int64, error) + type CaptchaInterface interface + BinaryEncoding func() []byte + WriteTo func(w io.Writer) (n int64, err error) + func GenerateCaptcha(idKey string, configuration interface{}) (id, val string, captchaInstance CaptchaInterface) + type CaptchaItem struct + Content string + ImageHeight int + ImageWidth int + VerifyValue string + type ConfigAudio struct + CaptchaLen int + Language string + type ConfigCharacter struct + BgColor *color.RGBA + BgHashColor string + CaptchaLen int + ChineseCharacterSource string + ComplexOfNoiseDot int + ComplexOfNoiseText int + Height int + IsShowHollowLine bool + IsShowNoiseDot bool + IsShowNoiseText bool + IsShowSineLine bool + IsShowSlimeLine bool + IsUseSimpleFont bool + Mode int + SequencedCharacters []string + UseCJKFonts bool + Width int + type ConfigDigit struct + CaptchaLen int + DotCount int + Height int + MaxSkew float64 + Width int