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_NET_EXISTS     = errors.New("user doesn't exist")
	ERROR_USER_EXISTS         = errors.New("Users has been existed")
	ERROR_USER_PASSWORD_ERROR = errors.New("Password doesn't match Id")
)

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) Enroll

func (this *UserDao) Enroll(userId int, userPwd string) (err error)

func (*UserDao) Login

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

Jump to

Keyboard shortcuts

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