model

package
v0.0.0-...-2bf1368 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ERROR_USER_NOT_EXIST   = errors.New("user don't exist")
	ERROR_USER_EXIST       = errors.New("user has been existed")
	ERROR_USER_ID_PASSWARD = errors.New("id and the password doesn't match")
)

Functions

This section is empty.

Types

type User

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

type UserDao

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

func NewUserDao

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

func (*UserDao) Login

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

func (*UserDao) Register

func (this *UserDao) Register(user *User) (err error)

Jump to

Keyboard shortcuts

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