mysql

package
v0.0.0-...-3e06d77 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2018 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(db *sql.DB)

func Connet

func Connet() (db *sql.DB)

func CreateUser

func CreateUser(username, password, ip string) (int32, error)

func SetLastLoginIp

func SetLastLoginIp(id int32, ip string) (bool, error)

Types

type UserEntity

type UserEntity struct {
	Id       int32  `用户自增ID`
	Username string `用户名`
	Password string `用户密码,32位`
	Salt     string `用户的随机盐值,8位`
	Add_time string `创建时间`
	Status   int8   `用户状态,0禁用;1正常`
	Last_ip  string `最后一次登录IP`
}

func GetUserPass

func GetUserPass(username string) (*UserEntity, error)

Jump to

Keyboard shortcuts

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