menu

package
v0.0.0-...-cbaa3f3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Menu struct {
	Id    int64
	Title string

	Items []MenuItem `db:"-"`
}

func CreateMenu

func CreateMenu(db *gorp.DbMap, title string) (*Menu, error)

func GetAllMenu

func GetAllMenu(db *gorp.DbMap) ([]Menu, error)
func (m *Menu) AddItem(db *gorp.DbMap, item *MenuItem) error
func (m *Menu) RemoveItem(db *gorp.DbMap, item *MenuItem) error
type MenuItem struct {
	Id       int64
	Title    string
	Url      string
	Position int64
	ParentId int64
	MenuId   int64

	Childs []MenuItem `db:"="`
}

Jump to

Keyboard shortcuts

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