Documentation
¶
Index ¶
- Constants
- Variables
- type CaptchaCache
- func (c *CaptchaCache) Del(ctx context.Context, typ CaptchaType, email string) error
- func (c *CaptchaCache) Get(ctx context.Context, typ CaptchaType, email string) (string, error)
- func (c *CaptchaCache) Set(ctx context.Context, typ CaptchaType, email, captcha string) error
- func (c *CaptchaCache) Verify(ctx context.Context, typ CaptchaType, email string, captcha string) (bool, error)
- type CaptchaType
Constants ¶
View Source
const (
CaptchaKey = "captcha"
)
Variables ¶
View Source
var ( CaptchaTypeAuth = CaptchaType(usersvc.CaptchaType_AUTH.String()) CaptchaTypeReset = CaptchaType(usersvc.CaptchaType_RESET.String()) )
Functions ¶
This section is empty.
Types ¶
type CaptchaCache ¶
type CaptchaCache struct{}
func NewCaptchaCache ¶
func NewCaptchaCache() *CaptchaCache
func (*CaptchaCache) Del ¶
func (c *CaptchaCache) Del(ctx context.Context, typ CaptchaType, email string) error
func (*CaptchaCache) Get ¶
func (c *CaptchaCache) Get(ctx context.Context, typ CaptchaType, email string) (string, error)
func (*CaptchaCache) Set ¶
func (c *CaptchaCache) Set(ctx context.Context, typ CaptchaType, email, captcha string) error
func (*CaptchaCache) Verify ¶ added in v0.2.2
func (c *CaptchaCache) Verify(ctx context.Context, typ CaptchaType, email string, captcha string) (bool, error)
type CaptchaType ¶
type CaptchaType string
func NewCaptchaType ¶
func NewCaptchaType(t usersvc.CaptchaType) CaptchaType
Click to show internal directories.
Click to hide internal directories.