model

package
v0.0.0-...-583b118 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERROR_USER_NOTEXISTS = errors.New("用户不存在,请注册后登录..")
	ERROR_USER_EXISTS    = errors.New("用户已存在..")
	ERROR_USER_PWD       = errors.New("密码不正确")
)

Functions

This section is empty.

Types

type User

type User struct {
	UserID   int    `json:"userId"`
	UserPwd  string `json:"userPwd"`
	UserName string `json:"userName"`
}

type UserDao

type UserDao struct {
	// contains filtered or unexported fields
}
var (
	MyUserDao *UserDao
)

func NewUserDao

func NewUserDao(pool *redis.Pool) (userDao *UserDao)

func (*UserDao) GetUserById

func (userDao *UserDao) GetUserById(conn redis.Conn, id int) (user *User, err error)

func (*UserDao) Login

func (userDao *UserDao) Login(userId int, userPwd string) (user *User, err error)

func (*UserDao) Register

func (userDao *UserDao) Register(user *message.User) (err error)

Jump to

Keyboard shortcuts

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