didasy / mongodbcaptchastore

A storage engine for https://github.com/dchest/captcha package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mongodbcaptchastore

A storage engine for github.com/dchest/captcha using MongoDB

Dependencies

How To Use

timeout, _ := time.ParseDuration("5s")
expiration, _ := time.ParseDuration("1m")
s, err := mongodbcaptchastore.New("mongodb://localhost:27017", "captcha-db", "capcha-collection", 100 * 1024 * 1024, 100000, timeout, expiration)
if err != nil {
    panic(err)
}

// then use as custom store
captcha.SetCustomStore(s)

About

A storage engine for https://github.com/dchest/captcha package

License:MIT License


Languages

Language:Go 100.0%