Documentation
¶
Index ¶
- func Fail(action actions.ActionWrapper, err error)
- func FailPage(action actions.ActionWrapper, err error)
- func MatchPath(action *actions.ActionObject, path string) bool
- func SetSubMenu(action actions.ActionWrapper, menu *MenuGroup)
- func SetTabbar(action actions.ActionWrapper, tabbar *Tabbar)
- type ActionInterface
- type CSRF
- type Menu
- type MenuGroup
- type MenuItem
- type Page
- type ParentAction
- func (this *ParentAction) AdminContext() context.Context
- func (this *ParentAction) AdminId() int64
- func (this *ParentAction) CreateLog(level string, description string, args ...interface{})
- func (this *ParentAction) CreateLogInfo(description string, args ...interface{})
- func (this *ParentAction) ErrorPage(err error)
- func (this *ParentAction) ErrorText(err string)
- func (this *ParentAction) FirstMenu(menuItem string)
- func (this *ParentAction) Nav(mainMenu string, tab string, firstMenu string)
- func (this *ParentAction) NewPage(total int64, size ...int64) *Page
- func (this *ParentAction) NotFound(name string, itemId int64)
- func (this *ParentAction) Parent() *ParentAction
- func (this *ParentAction) RPC() *rpc.RPCClient
- func (this *ParentAction) SecondMenu(menuItem string)
- func (this *ParentAction) TinyMenu(menuItem string)
- func (this *ParentAction) ViewData() maps.Map
- type Tabbar
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionInterface ¶ added in v0.2.8
type CSRF ¶
type CSRF struct {
}
func (*CSRF) BeforeAction ¶
func (this *CSRF) BeforeAction(actionPtr actions.ActionWrapper, paramName string) (goNext bool)
type Menu ¶
type Menu struct {
Id string `json:"id"`
Name string `json:"name"`
Items []*MenuItem `json:"items"`
IsActive bool `json:"isActive"`
AlwaysActive bool `json:"alwaysActive"`
Index int `json:"index"`
CountNormalItems int `json:"countNormalItems"`
}
Menu 子菜单定义
type MenuItem ¶
type MenuItem struct {
Id string `json:"id"`
Name string `json:"name"`
SubName string `json:"subName"` // 副标题
SupName string `json:"supName"` // 头标
URL string `json:"url"`
IsActive bool `json:"isActive"`
Icon string `json:"icon"`
IsSortable bool `json:"isSortable"`
SubColor string `json:"subColor"`
}
MenuItem 菜单项
type Page ¶
type Page struct {
Offset int64 // 开始位置
Size int64 // 每页显示数量
Current int64 // 当前页码
Max int64 // 最大页码
Total int64 // 总数量
Path string
Query url.Values
}
func NewActionPage ¶
func NewActionPage(actionPtr actions.ActionWrapper, total int64, size int64) *Page
type ParentAction ¶
type ParentAction struct {
actions.ActionObject
// contains filtered or unexported fields
}
func FindParentAction ¶
func FindParentAction(actionPtr actions.ActionWrapper) *ParentAction
FindParentAction 查找父级Action
func (*ParentAction) AdminContext ¶
func (this *ParentAction) AdminContext() context.Context
AdminContext 获取Context
func (*ParentAction) AdminId ¶
func (this *ParentAction) AdminId() int64
func (*ParentAction) CreateLog ¶
func (this *ParentAction) CreateLog(level string, description string, args ...interface{})
func (*ParentAction) CreateLogInfo ¶
func (this *ParentAction) CreateLogInfo(description string, args ...interface{})
func (*ParentAction) ErrorPage ¶
func (this *ParentAction) ErrorPage(err error)
func (*ParentAction) ErrorText ¶
func (this *ParentAction) ErrorText(err string)
func (*ParentAction) FirstMenu ¶
func (this *ParentAction) FirstMenu(menuItem string)
func (*ParentAction) Nav ¶
func (this *ParentAction) Nav(mainMenu string, tab string, firstMenu string)
func (*ParentAction) NotFound ¶
func (this *ParentAction) NotFound(name string, itemId int64)
func (*ParentAction) SecondMenu ¶
func (this *ParentAction) SecondMenu(menuItem string)
func (*ParentAction) TinyMenu ¶
func (this *ParentAction) TinyMenu(menuItem string)
func (*ParentAction) ViewData ¶ added in v0.2.8
func (this *ParentAction) ViewData() maps.Map
ViewData 视图里可以使用的数据
Click to show internal directories.
Click to hide internal directories.