Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuiltinTreeDataBuilder ¶
type BuiltinTreeDataBuilder struct {
// contains filtered or unexported fields
}
BuiltinTreeDataBuilder builder of tree data list
func (*BuiltinTreeDataBuilder) GetTreeData ¶
func (tb *BuiltinTreeDataBuilder) GetTreeData(parentKey interface{}) []TreeData
GetTreeData list
func (*BuiltinTreeDataBuilder) Push ¶
func (tb *BuiltinTreeDataBuilder) Push(treeElement TreeData, parentKey interface{})
Push element
type IDParam ¶
type IDParam struct {
ID int64 `json:"id" form:"id" validate:"optional" label:"ID"`
}
IDParam form data
type ListQueryParam ¶
type ListQueryParam struct { PaginationParam SortingParam Filters map[string]string `json:"filter" form:"filter" validate:"optional" label:"筛选"` }
ListQueryParam list query parameter
type ListQueryResponse ¶
type ListQueryResponse struct { Total int64 `json:"total" validate:"required" label:"总计"` Items interface{} `json:"items" label:"数据"` }
ListQueryResponse list query response data
type PaginationParam ¶
type PaginationParam struct { Page int `json:"page" form:"page" validate:"optional" label:"页码"` PageSize int `json:"pageSize" form:"pageSize" validate:"required" default:"20" label:"分页条数"` }
PaginationParam pagination parameter
func (*PaginationParam) GetPageOffset ¶
func (p *PaginationParam) GetPageOffset() int
GetPageOffset offset for db offset query
func (*PaginationParam) GetPageSize ¶
func (p *PaginationParam) GetPageSize() int
GetPageSize page size for db limit query
type SortingParam ¶
type SortingParam struct { Sort string `json:"sort" form:"sort" validate:"optional" label:"排序字段"` Order string `json:"sortOrder" form:"sortOrder" validate:"optional" label:"排序顺序"` }
SortingParam sorting parameter
type TreeData ¶
type TreeData struct { Key interface{} `json:"key"` Title string `json:"title"` Children []TreeData `json:"children"` BindData interface{} `json:"bindData,omitempty"` }
TreeData structure
func (*TreeData) SetChildren ¶
func (td *TreeData) SetChildren(children []TreeDataInterface)
type TreeDataBuilder ¶
type TreeDataBuilder struct {
// contains filtered or unexported fields
}
TreeDataBuilder builder of tree data list
func (*TreeDataBuilder) GetTreeData ¶
func (tb *TreeDataBuilder) GetTreeData(parentKey interface{}) []TreeDataInterface
GetTreeData list
func (*TreeDataBuilder) Push ¶
func (tb *TreeDataBuilder) Push(treeElement TreeDataInterface, parentKey interface{})
Push element
type TreeDataInterface ¶
type TreeDataInterface interface { GetKey() interface{} GetTitle() string SetChildren([]TreeDataInterface) }
TreeDataInterface interface
Click to show internal directories.
Click to hide internal directories.