menu

package
v0.0.0-...-118bb3a Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MenuDao struct {
}

func NewMenuDao

func NewMenuDao() *MenuDao
func (d *MenuDao) BuildMenuTree(menus []*models.Menu, parentID uint) []*models.MenuTree

BuildMenuTree 构建菜单树

func (d *MenuDao) CreateMenu(menu *models.Menu) error

CreateMenu 创建菜单

func (d *MenuDao) DeleteMenu(id uint) error

DeleteMenu 删除菜单

func (d *MenuDao) GetMenuByID(id uint) (*models.Menu, error)

GetMenuByID 根据ID获取菜单

func (d *MenuDao) GetMenus() ([]*models.Menu, error)

GetMenus 获取所有菜单

func (d *MenuDao) GetMenusByPermissions(permissions []string) ([]*models.Menu, error)

GetMenusByPermissions 根据权限获取菜单

func (d *MenuDao) UpdateMenu(menu *models.Menu) error

UpdateMenu 更新菜单

Jump to

Keyboard shortcuts

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