authpkg

package
v0.0.0-...-bdae527 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERROR_USER_PWD     = errors.New("密码错误")
	ERROR_USER_NOEXIST = errors.New("用户不存在")
	ERROR_USER_EXIST   = errors.New("用户已存在")
)

Functions

This section is empty.

Types

type UserDao

type UserDao struct {
	// contains filtered or unexported fields
}
var ConstDao *UserDao

func NewDao

func NewDao(pool *redis.Pool) (userdao *UserDao)

func (*UserDao) CheckUserInfo

func (this *UserDao) CheckUserInfo(id int, pwd string) (user *UserInfo, err error)

func (*UserDao) GetUserById

func (this *UserDao) GetUserById(con redis.Conn, id int) (user *UserInfo, err error)

func (*UserDao) Register

func (this *UserDao) Register(user *base.UserInfo) (err error)

type UserInfo

type UserInfo struct {
	UserId int    `json:"userid"`
	Upwd   string `json:"upwd"`
}

Jump to

Keyboard shortcuts

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