Documentation ¶ Index ¶ Variables type Vcode func New(cli redis.Cmdable, cfg config.CaptchaConfig) *Vcode func (vc *Vcode) GenerateBase64(id string) (string, error) func (vc *Vcode) GenerateImage(w io.Writer, id string) error func (vc *Vcode) NewLen(length int) (id string) func (vc *Vcode) Reload(id string) bool func (vc *Vcode) Verify(id, answer string, clear bool) bool Constants ¶ This section is empty. Variables ¶ View Source var ( ErrNotFound = errors.New("captcha: id not found") ) Functions ¶ This section is empty. Types ¶ type Vcode ¶ type Vcode struct { // contains filtered or unexported fields } func New ¶ func New(cli redis.Cmdable, cfg config.CaptchaConfig) *Vcode func (*Vcode) GenerateBase64 ¶ func (vc *Vcode) GenerateBase64(id string) (string, error) func (*Vcode) GenerateImage ¶ func (vc *Vcode) GenerateImage(w io.Writer, id string) error func (*Vcode) NewLen ¶ func (vc *Vcode) NewLen(length int) (id string) func (*Vcode) Reload ¶ func (vc *Vcode) Reload(id string) bool func (*Vcode) Verify ¶ func (vc *Vcode) Verify(id, answer string, clear bool) bool Source Files ¶ View all Source files vcode.go Directories ¶ Show internal Expand all Path Synopsis store Click to show internal directories. Click to hide internal directories.