service

package
v0.0.0-...-8e1329c Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TokenNone  = 0 //不验证Token
	TokenUser  = 1 //验证客户端登录Token
	TokenAdmin = 2 //管理后台使用配置的超级Token.

	UserSexUnknown   = int16(0)
	UserSexMale      = int16(1)
	UserSexFemale    = int16(2)
	UserSexOtherwise = int16(3)

	// normal user
	UserTypeNormal = int32(1)
	// 账号正常.
	UserStatusOK = int16(1)
	// 账号被禁用/锁定
	UserStatusDisabled = int16(-1)
)

Variables

This section is empty.

Functions

func CheckCaptcha

func CheckCaptcha(ctx *ginplus.ContextPlus, captchaID, captchaValue string, client string)

CheckCaptcha 校验Captcha

func CheckSmsCode

func CheckSmsCode(bizType, tel string, reqCode string) (ok bool, reason string)

CheckSmsCode 检查短信.

func CheckTelSmsCode

func CheckTelSmsCode(ctx *ginplus.ContextPlus, bizType, tel, code string) (ok bool)

func GenerateCode

func GenerateCode(bizType string, length int) string

GenerateCode 生成验证码.

func LoginInternal

func LoginInternal(ctx *ginplus.ContextPlus, userInfo *dao.UserInfo)

func SendSmsCode

func SendSmsCode(bizType, tel, code string) (ok bool, reason string)

SendSmsCode 发送短信,并保存到redis.

Types

This section is empty.

Jump to

Keyboard shortcuts

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