Documentation ¶
Index ¶
- Constants
- type Menu
- func (m Menu) Exist() bool
- func (m Menu) FetchTreeList(selector interface{}) (results []Menu, err error)
- func (m Menu) FindAll(query, selector interface{}) (results []Menu, err error)
- func (m Menu) FindOneTree() (menu Menu, err error)
- func (m Menu) FindPageBuildFilter(roles []model_role.Role, page, limit int, query, selector interface{}, ...) ([]Menu, error)
- func (m Menu) FindPageListFilter(page, limit int, query, selector interface{}, fields ...string) ([]Menu, error)
- func (m Menu) FindPageTreeFilter(page, limit int, query, selector interface{}, fields ...string) ([]Menu, error)
- func (m Menu) Insert() (int64, error)
- func (m Menu) Remove() error
- func (m Menu) ToJson() string
- func (m Menu) TotalCount(query, selector interface{}) (int, error)
- func (m Menu) Update() error
Constants ¶
View Source
const ( //MenuMenuAll = "MENU_ALL" MenuPermissionSelect = "MENU_SELECT" MenuPermissionCreate = "MENU_CREATE" MenuPermissionEdit = "MENU_EDIT" MenuPermissionDelete = "MENU_DELETE" MenuTypeList = 1 MenuTypeTree = 2 MenuTypeBuild = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Menu ¶
type Menu struct { Id int64 `json:"id,omitempty" bson:"_id,omitempty"` PId int64 `json:"pid,omitempty" bson:"pid"` //父节点ID Sort int `json:"sort" bson:"sort"` Icon string `json:"icon,omitempty" bson:"icon,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` Label string `json:"label,omitempty" bson:"label,omitempty"` Path string `json:"path,omitempty" bson:"path,omitempty"` AlwaysShow bool `json:"alwaysShow" bson:"alwaysShow"` Component string `json:"component,omitempty" bson:"component,omitempty"` IFrame bool `json:"iframe" bson:"iframe"` CreateTime int64 `json:"createTime,omitempty" bson:"createTime,omitempty"` Children []Menu `json:"children,omitempty" bson:"children,omitempty"` Roles []model_role.Role `json:"roles,omitempty" bson:"roles,omitempty"` Meta meta `json:"meta,omitempty" bson:"meta,omitempty"` // contains filtered or unexported fields }
func (Menu) FetchTreeList ¶
func (Menu) FindOneTree ¶
func (Menu) FindPageBuildFilter ¶
func (Menu) FindPageListFilter ¶
func (Menu) FindPageTreeFilter ¶
func (Menu) TotalCount ¶
Click to show internal directories.
Click to hide internal directories.