user

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Detail

func Detail(ctx *macaron.Context) string

Detail 用户详情

func Disable

func Disable(ctx *macaron.Context) string

禁用用户

func Enable

func Enable(ctx *macaron.Context) string

激活用户

func Index

func Index(ctx *macaron.Context) string

Index 用户列表页

func IsAdmin

func IsAdmin(ctx *macaron.Context) bool

IsAdmin 判断当前用户是否是管理员

func IsLogin

func IsLogin(ctx *macaron.Context) bool

IsLogin 判断用户是否已登录

func Remove

func Remove(ctx *macaron.Context) string

删除用户

func RestoreToken

func RestoreToken(ctx *macaron.Context) error

还原jwt

func Store

func Store(ctx *macaron.Context, form UserForm) string

保存任务

func Uid

func Uid(ctx *macaron.Context) int

Uid 获取session中的Uid

func UpdateMyPassword

func UpdateMyPassword(ctx *macaron.Context) string

UpdateMyPassword 更新我的密码

func UpdatePassword

func UpdatePassword(ctx *macaron.Context) string

UpdatePassword 更新密码

func Username

func Username(ctx *macaron.Context) string

Username 获取session中的用户名

func ValidateLogin

func ValidateLogin(ctx *macaron.Context) string

ValidateLogin 验证用户登录

Types

type UserForm

type UserForm struct {
	Id              int
	Name            string `binding:"Required;MaxSize(32)"` // 用户名
	Password        string // 密码
	ConfirmPassword string // 确认密码
	Email           string `binding:"Required;MaxSize(50)"` // 邮箱
	IsAdmin         int8   // 是否是管理员 1:管理员 0:普通用户
	Status          models.Status
}

UserForm 用户表单

Jump to

Keyboard shortcuts

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