menu

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir added in v0.1.1

func Dir(dir string, base string)

func EmbedFS added in v0.1.1

func EmbedFS(fs embed.FS, base string)

func Load added in v0.1.1

func Load() error

func Register

func Register(name string, menu *Menu)

func Startup added in v0.1.1

func Startup() error

func Unregister

func Unregister(name string)

func Zip added in v0.1.1

func Zip(zip string, base string)

Types

type Item

type Item struct {
	Name string `json:"name,omitempty"`
	//Type       string         `json:"type,omitempty"` //route 路由, web 嵌入web, window 独立弹出
	Url        string         `json:"url,omitempty"`
	Query      map[string]any `json:"query,omitempty"`
	Privileges []string       `json:"privileges,omitempty"`
}
type Menu struct {
	Name string `json:"name"`
	Icon string `json:"icon,omitempty"`
	//Domain     []string `json:"domain"` //域 admin project 或 dealer等
	Privileges []string `json:"privileges,omitempty"`
	Items      []*Item  `json:"items"`
	Index      int      `json:"index"`
}

Jump to

Keyboard shortcuts

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