sys

package
v0.0.0-...-2a2bf8c Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitMenu

func InitMenu(model sys.Menu)

新增菜单后自动添加菜单下的常规操作

Types

type Aadminlogs

type Aadminlogs struct {
}

func (Aadminlogs) List

func (Aadminlogs) List(c *gin.Context)

type Admins

type Admins struct{}

func (Admins) AdminsRoleIDList

func (Admins) AdminsRoleIDList(c *gin.Context)

获取用户下的角色ID列表

func (Admins) Create

func (Admins) Create(c *gin.Context)

新增

func (Admins) Delete

func (Admins) Delete(c *gin.Context)

删除数据

func (Admins) Detail

func (Admins) Detail(c *gin.Context)

详情

func (Admins) List

func (Admins) List(c *gin.Context)

分页数据

func (Admins) SetRole

func (Admins) SetRole(c *gin.Context)

分配用户角色权限

func (Admins) Update

func (Admins) Update(c *gin.Context)

更新

type Emailconfig

type Emailconfig struct {
}

func (Emailconfig) List

func (Emailconfig) List(c *gin.Context)
type Menu struct{}
func (Menu) AllMenu(c *gin.Context)

所有菜单

func (Menu) Create(c *gin.Context)

新增

func (Menu) Delete(c *gin.Context)

删除数据

func (Menu) Detail(c *gin.Context)

详情

func (Menu) List(c *gin.Context)

分页数据

func (Menu) MenuButtonList(c *gin.Context)

获取菜单有权限的操作列表

func (Menu) Update(c *gin.Context)

更新

type MenuMeta struct {
	Title   string `json:"title"`   // 标题
	Icon    string `json:"icon"`    // 图标
	NoCache bool   `json:"noCache"` // 是不是缓存
}
type MenuModel struct {
	Path      string      `json:"path"`      // 路由
	Component string      `json:"component"` // 对应vue中的map name
	Name      string      `json:"name"`      // 菜单名称
	Hidden    bool        `json:"hidden"`    // 是否隐藏
	Meta      MenuMeta    `json:"meta"`      // 菜单信息
	Children  []MenuModel `json:"children"`  // 子级菜单
}

type Role

type Role struct{}

func (Role) AllRole

func (Role) AllRole(c *gin.Context)

所有角色

func (Role) Create

func (Role) Create(c *gin.Context)

新增

func (Role) Delete

func (Role) Delete(c *gin.Context)

删除数据

func (Role) Detail

func (Role) Detail(c *gin.Context)

详情

func (Role) List

func (Role) List(c *gin.Context)

分页数据

func (Role) RoleMenuIDList

func (Role) RoleMenuIDList(c *gin.Context)

获取角色下的菜单ID列表

func (Role) SetRole

func (Role) SetRole(c *gin.Context)

设置角色菜单权限

func (Role) Update

func (Role) Update(c *gin.Context)

更新

type Systemconfig

type Systemconfig struct{}

func (Systemconfig) List

func (Systemconfig) List(c *gin.Context)

获取系统配置列表

func (Systemconfig) Save

func (Systemconfig) Save(c *gin.Context)

/添加和更新2个功能 如果不存在就是添加,如果已经存在就是更新

func (Systemconfig) SaveUploadedFile

func (Systemconfig) SaveUploadedFile(c *gin.Context)

/ 上传图片

type User

type User struct{}

func (User) EditPwd

func (User) EditPwd(c *gin.Context)

用户修改密码

func (User) Info

func (User) Info(c *gin.Context)

获取用户信息及可访问的权限菜单

func (User) Info2

func (User) Info2(c *gin.Context)

获取用户信息及可访问的权限菜单

func (User) Login

func (User) Login(c *gin.Context)

用户登录

func (User) Logout

func (User) Logout(c *gin.Context)

用户登出

type UserData

type UserData struct {
	Menus        []MenuModel `json:"menus"`        // 菜单
	Introduction string      `json:"introduction"` // 介绍
	Avatar       string      `json:"avatar"`       // 图标
	Name         string      `json:"name"`         // 姓名
}

Jump to

Keyboard shortcuts

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