menu

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GlobalMenu = &Menu{
	GlobalMenuList:   []MenuItem{},
	GlobalMenuOption: []map[string]string{},
	MaxOrder:         0,
}
View Source
var InitMenuOnce = &Once{
	done: 0,
}

Functions

func InitMenu

func InitMenu(user auth.User)

func SetGlobalMenu

func SetGlobalMenu(user auth.User)

func Unlock

func Unlock()

Types

type Menu struct {
	GlobalMenuList   []MenuItem
	GlobalMenuOption []map[string]string
	MaxOrder         int64
}

func GetGlobalMenu

func GetGlobalMenu(user auth.User) Menu
func (menu *Menu) GetEditMenuList() []MenuItem
func (menu *Menu) SetActiveClass(path string)
func (menu *Menu) SexMaxOrder(order int64)
type MenuItem struct {
	Name         string
	ID           string
	Url          string
	Icon         string
	Active       string
	ChildrenList []MenuItem
}

func ConstructMenuTree

func ConstructMenuTree(menus []map[string]interface{}, parentId int64) []MenuItem

func GetMenuItemById

func GetMenuItemById(id string) MenuItem

type Once

type Once struct {
	// contains filtered or unexported fields
}

func (*Once) Do

func (o *Once) Do(f func())

Jump to

Keyboard shortcuts

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