user

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BjutRegister

func BjutRegister(c *gin.Context)

func CurrentUser

func CurrentUser(c *gin.Context) model.User

获取当前登录用户的信息

func Home

func Home(c *gin.Context)

用户主页

func Login

func Login(c *gin.Context)

用户登录

func Logout

func Logout(c *gin.Context)

func Register

func Register(c *gin.Context)

用户注册

func Update

func Update(c *gin.Context)

Types

type HomeInfo

type HomeInfo struct {
	ID        uint
	CreatedAt time.Time
	NickName  string
	Email     string
	Telephone string
	College   string
	Major     string
	ClassName string
	Number    string
	RealName  string
}

给用户显示的信息

type LoginInfo

type LoginInfo struct {
	Nickname string `binding:"required,min=2,max=30"`
	Password string `binding:"required,min=8,max=40"`
}

type RegisterInfo

type RegisterInfo struct {
	NickName   string `binding:"required,min=2,max=30"`
	Password   string `binding:"required,min=8,max=40"`
	PwdConfirm string `binding:"eqfield=Password"`
}

Jump to

Keyboard shortcuts

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