/** * @Author: jager * @Email: lhj168os@gmail.com * @File: handles * @Date: 2021/12/31 4:43 下午 * @package: dao * @Version: v1.0.0 * * @Description: * */ package user import ( "github.com/gin-gonic/gin" "idata/internal/types" ) func Register(ctx *gin.Context) { } func Login(ctx *gin.Context) { } func Info(ctx *gin.Context) { } func Auth(uid, secret string) bool { var ok bool err := Operate(uid, func(u types.RUser) { if u.Secret() == secret { ok = true } }) return err == nil && ok }