cache

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL