Documentation ¶
Index ¶
Constants ¶
View Source
const ( //验证码 EmailCodeGetParamsInvalidMsg string = "获取验证码:提交的验证码参数无效,请检查验证码ID以及文件名后缀是否完整" EmailCodeGetParamsInvalidCode int = -400350 EmailCodeCheckParamsInvalidMsg string = "" /* 127-byte string literal not displayed */ EmailCodeCheckParamsInvalidCode int = -400351 EmailCodeCheckOkMsg string = "验证码校验通过" EmailCodeCheckFailCode int = -400355 EmailCodeCheckFailMsg string = "验证码校验失败" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EmailCodeController ¶
type EmailCodeController struct { controller.ResourceController EmailCodeValidator *EmailCodeValidator `inject:"emailCodeValidator"` }
func (*EmailCodeController) CheckCode ¶
func (e *EmailCodeController) CheckCode(c *gin.Context)
func (*EmailCodeController) GenerateCode ¶
func (e *EmailCodeController) GenerateCode(c *gin.Context)
func (*EmailCodeController) InitRouter ¶
func (e *EmailCodeController) InitRouter(g *gin.RouterGroup) *gin.RouterGroup
*
- 处理WEB验证码的API路由
type EmailCodeSender ¶
type EmailCodeSender struct {
EmailSender email.EmailSender `inject:"emailSender"`
}
func (*EmailCodeSender) SendVerificationCode ¶
func (s *EmailCodeSender) SendVerificationCode(dest string, scene string, code string) error
type EmailCodeValidator ¶
type EmailCodeValidator struct { code.Validator Sender code.CodeSender `inject:"emailCodeSender"` Store code.CodeStore `inject:"emailCodeStore"` }
func (*EmailCodeValidator) GetSender ¶
func (v *EmailCodeValidator) GetSender() code.CodeSender
func (*EmailCodeValidator) GetStore ¶
func (v *EmailCodeValidator) GetStore() code.CodeStore
func (*EmailCodeValidator) HandleSmsCodeVerify ¶
func (v *EmailCodeValidator) HandleSmsCodeVerify(force bool) gin.HandlerFunc
Click to show internal directories.
Click to hide internal directories.