Documentation ¶
Index ¶
- Variables
- func AddLog(mylog *model.ActionLog) (err error)
- func AddUser(id int64, name, info, pass string) (err error)
- func DelUser(id int64) (err error)
- func EditUser(id int64, name, info string, status int, pass string) (err error)
- func EditUserRole(userId, roleId int64) (err error)
- func FormatTime(t int64) string
- func GetPermissionByUserId(userId int64) (mp []*model.Permission, err error)
- func GetUserInfoByName(name, password string) (out *model.User, err error)
- func GetUserRole(in int64) *model.Role
- func Init(dbDsn string, num int, dbName string, debug bool, adminList map[string]string) (err error)
- func Reload() (err error)
- func ValidatePermission(userId int64, path string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Logs *logs.BeeLogger AdminList map[string]string )
View Source
var ( ErrorUserNotExist = errors.New("没有此用户id") ErrorUserStatus = errors.New("用户状态异常") ErrosRoleStatus = errors.New("角色状态异常") ErrorUserRoleNotExist = errors.New("用户角色无此用户") ErrorRolePermissnonNotExist = errors.New("角色权限无此角色") )
View Source
var FuncMap template.FuncMap
Functions ¶
func EditUserRole ¶
func GetPermissionByUserId ¶
func GetPermissionByUserId(userId int64) (mp []*model.Permission, err error)
根据用户ID获得所有菜单 缓存读取
func GetUserInfoByName ¶
根据用户名和密码验证是否可以登录 从数据库读取
func GetUserRole ¶
func ValidatePermission ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.