Documentation ¶
Index ¶
- Variables
- func ProjectAdd(index int, list ...*ProjectItem)
- func ProjectAddNavList(name string, ident string, navList *List)
- func ProjectIdent(urlPath string) string
- func ProjectRemove(index int)
- func ProjectSet(index int, list ...*ProjectItem)
- func ProjectURLsIdent() map[string]string
- func TopNavURLs() map[string]int
- type Item
- type List
- type ProjectItem
- type ProjectList
- type Projects
- func (p *Projects) Add(index int, list ...*ProjectItem) *Projects
- func (p *Projects) First() *ProjectItem
- func (p *Projects) Get(ident string) *ProjectItem
- func (p *Projects) InitURLsIdent() *Projects
- func (p *Projects) Remove(index int) *Projects
- func (p *Projects) Set(index int, list ...*ProjectItem) *Projects
- func (p *Projects) URLsIdent() map[string]string
Constants ¶
This section is empty.
Variables ¶
View Source
var EmptyList = List{}
EmptyList 空菜单列表
LeftNavigate 左边导航菜单
View Source
true, Name: `设置`, Action: `manager`, Icon: `gear`, Children: &List{ { DisplayOnMenu: true, Name: `系统设置`, Action: `settings`, }, { DisplayOnMenu: true, Name: `用户管理`, Action: `user`, }, { DisplayOnMenu: true, Name: `添加用户`, Action: `user_add`, Icon: `plus`, }, { DisplayOnMenu: true, Name: `角色管理`, Action: `role`, }, { DisplayOnMenu: true, Name: `添加角色`, Action: `role_add`, Icon: `plus`, }, { DisplayOnMenu: true, Name: `邀请码`, Action: `invitation`, }, { DisplayOnMenu: true, Name: `验证码`, Action: `verification`, }, { DisplayOnMenu: true, Name: `清理缓存`, Action: `clear_cache`, Target: `ajax`, }, { DisplayOnMenu: false, Name: `修改用户`, Action: `user_edit`, }, { DisplayOnMenu: false, Name: `删除用户`, Action: `user_delete`, }, { DisplayOnMenu: false, Name: `修改角色`, Action: `role_edit`, }, { DisplayOnMenu: false, Name: `删除角色`, Action: `role_delete`, }, { DisplayOnMenu: false, Name: `添加邀请码`, Action: `invitation_add`, }, { DisplayOnMenu: false, Name: `修改邀请码`, Action: `invitation_edit`, }, { DisplayOnMenu: false, Name: `删除邀请码`, Action: `invitation_delete`, }, { DisplayOnMenu: false, Name: `删除验证码`, Action: `verification_delete`, }, { DisplayOnMenu: false, Name: `上传图片`, Action: `upload/:type`, }, { DisplayOnMenu: true, Name: `本地附件`, Action: `uploaded_file`, }, }, }, { DisplayOnMenu: true, Name: `工具箱`, Action: `tool`, Icon: `suitcase`, Children: &List{ { DisplayOnMenu: true, Name: `IP归属地`, Action: `ip`, }, { DisplayOnMenu: true, Name: `Base64解码`, Action: `base64`, }, { DisplayOnMenu: true, Name: `URL解码`, Action: `url`, }, { DisplayOnMenu: true, Name: `时间戳转换`, Action: `timestamp`, }, }, }, }{ DisplayOnMenu:
TopNavigate 顶部导航菜单
Functions ¶
func ProjectAdd ¶
func ProjectAdd(index int, list ...*ProjectItem)
func ProjectAddNavList ¶
func ProjectIdent ¶
func ProjectRemove ¶
func ProjectRemove(index int)
func ProjectSet ¶
func ProjectSet(index int, list ...*ProjectItem)
func ProjectURLsIdent ¶
func TopNavURLs ¶
Types ¶
type Item ¶
type Item struct { DisplayOnMenu bool //是否在菜单三显示 Name string //名称 Action string //操作(一般为网址) Icon string //图标 Target string //打开方式 Unlimited bool //是否不限制权限 Children *List }
Item 操作
type ProjectItem ¶
func NewProject ¶
func NewProject(name string, ident string, navList *List) *ProjectItem
func ProjectFirst ¶
func ProjectFirst() *ProjectItem
func ProjectGet ¶
func ProjectGet(ident string) *ProjectItem
func (*ProjectItem) GetIdent ¶
func (a *ProjectItem) GetIdent() string
func (*ProjectItem) GetName ¶
func (a *ProjectItem) GetName() string
func (*ProjectItem) Is ¶
func (a *ProjectItem) Is(ident string) bool
type ProjectList ¶
type ProjectList []*ProjectItem
func ProjectListAll ¶
func ProjectListAll() ProjectList
func (*ProjectList) Add ¶
func (a *ProjectList) Add(index int, list ...*ProjectItem) *ProjectList
Add 添加列表项
func (*ProjectList) Set ¶
func (a *ProjectList) Set(index int, list ...*ProjectItem) *ProjectList
Set 设置元素
type Projects ¶
type Projects struct { List *ProjectList Hash map[string]*ProjectItem //项目标识(Ident)=>项目信息 // contains filtered or unexported fields }
func NewProjects ¶
func NewProjects() *Projects
func ProjectInitURLsIdent ¶
func ProjectInitURLsIdent() *Projects
func (*Projects) First ¶
func (p *Projects) First() *ProjectItem
func (*Projects) Get ¶
func (p *Projects) Get(ident string) *ProjectItem
func (*Projects) InitURLsIdent ¶
Click to show internal directories.
Click to hide internal directories.