Documentation ¶
Index ¶
- func SanitizeMenu[T Menu | EditMenu](input T)
- type EditItem
- type EditMenu
- func (m EditMenu) AsMenu() (clone Menu)
- func (m EditMenu) CollapseAll()
- func (m EditMenu) ExpandAll()
- func (m EditMenu) Len() (size int)
- func (m EditMenu) ProcessAllChanges() (modified EditMenu)
- func (m EditMenu) ProcessChanges() (modified EditMenu, changed bool)
- func (m EditMenu) SanitizeAll()
- func (m EditMenu) String() (value string)
- type Item
- type Menu
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SanitizeMenu ¶ added in v0.5.0
Types ¶
type EditItem ¶ added in v0.5.0
type EditItem struct { Text string `json:"text"` Href string `json:"href,omitempty"` Lang string `json:"lang,omitempty"` Title string `json:"title,omitempty"` Target string `json:"target,omitempty"` Icon string `json:"icon,omitempty"` Image string `json:"image,omitempty"` ImgAlt string `json:"img-alt,omitempty"` Active bool `json:"active,omitempty"` SubMenu EditMenu `json:"sub-menu,omitempty"` Hidden string `json:"hidden,omitempty"` Context context.Context `json:"context,omitempty"` Expand string `json:"expand,omitempty"` ExpandExtras string `json:"expand-extras,omitempty"` Delete bool `json:"delete,omitempty"` MoveUp bool `json:"move-up,omitempty"` MoveDown bool `json:"move-down,omitempty"` Append bool `json:"append,omitempty"` }
type EditMenu ¶ added in v0.5.0
type EditMenu []*EditItem
func NewEditMenuFromJson ¶ added in v0.5.0
func (EditMenu) CollapseAll ¶ added in v0.5.0
func (m EditMenu) CollapseAll()
func (EditMenu) ProcessAllChanges ¶ added in v0.5.0
func (EditMenu) ProcessChanges ¶ added in v0.5.0
func (EditMenu) SanitizeAll ¶ added in v0.5.0
func (m EditMenu) SanitizeAll()
type Item ¶
type Item struct { Text string `json:"text"` Href string `json:"href,omitempty"` Lang string `json:"lang,omitempty"` Title string `json:"title,omitempty"` Target string `json:"target,omitempty"` Icon string `json:"icon,omitempty"` Image string `json:"image,omitempty"` ImgAlt string `json:"img-alt,omitempty"` Active bool `json:"active,omitempty"` SubMenu Menu `json:"sub-menu,omitempty"` Hidden string `json:"hidden,omitempty"` Context context.Context `json:"context,omitempty"` }
type Menu ¶
type Menu []*Item
func NewMenuFromJson ¶
func (Menu) DeepActive ¶ added in v0.5.0
func (Menu) SanitizeAll ¶ added in v0.5.0
func (m Menu) SanitizeAll()
Click to show internal directories.
Click to hide internal directories.