Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCaptchaNotMatch = fmt.Errorf("captcha not match")
View Source
var ProviderSet = wire.NewSet(NewCaptchaService)
ProviderSet is service providers.
Functions ¶
This section is empty.
Types ¶
type CaptchaRcache ¶
type CaptchaRcache struct {
// contains filtered or unexported fields
}
func NewCaptchaRcache ¶
func NewCaptchaRcache(rcli *redis.Client) *CaptchaRcache
func (*CaptchaRcache) NewMailCaptcha ¶
func (*CaptchaRcache) VerifyEmailCaptcha ¶
func (c *CaptchaRcache) VerifyEmailCaptcha(ctx context.Context, userid, mail, captcha string) error
type CaptchaService ¶
type CaptchaService struct { captchaApi.UnimplementedCaptchaServer // contains filtered or unexported fields }
func NewCaptchaService ¶
func NewCaptchaService(c *conf.CaptchaConfig, k *conf.KafkaConfig, reg registry.Registrar, rc *conf.RedisConfig) *CaptchaService
func (*CaptchaService) SendEmailCaptcha ¶
func (cs *CaptchaService) SendEmailCaptcha(ctx context.Context, req *captchaApi.SendEmailCaptchaReq) (*captchaApi.Empty, error)
func (*CaptchaService) VerifyEmailCaptcha ¶
func (cs *CaptchaService) VerifyEmailCaptcha(ctx context.Context, req *captchaApi.VerifyEmailCaptchaReq) (*captchaApi.Empty, error)
Click to show internal directories.
Click to hide internal directories.