You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
531 B
Go

3 years ago
/**
* @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
}