Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Captcha ¶
type Captcha struct { // url prefix for captcha image URLPrefix string // specify captcha id input field name FieldIDName string // specify captcha result input field name FieldCaptchaName string // captcha image width and height StdWidth int StdHeight int // captcha chars nums ChallengeNums int // captcha expiration seconds Expiration time.Duration // cache key prefix CachePrefix string // contains filtered or unexported fields }
Captcha struct
func NewCaptcha ¶
NewCaptcha create a new captcha.Captcha
func NewWithFilter ¶
NewWithFilter create a new captcha.Captcha and auto AddFilter for serve captacha image and add a template func for output html
func (*Captcha) CreateCaptcha ¶
CreateCaptcha create a new captcha id
func (*Captcha) CreateCaptchaHTML ¶
CreateCaptchaHTML template func for output html
type Image ¶ added in v0.0.4
Image struct
type Storage ¶
type Storage interface { // Get a cached value by key. Get(ctx context2.Context, key string) (interface{}, error) // Set a cached value with key and expire time. Put(ctx context2.Context, key string, val interface{}, timeout time.Duration) error // Delete cached value by key. Delete(ctx context2.Context, key string) error }
Click to show internal directories.
Click to hide internal directories.