Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResourceSortBy ¶
func ResourceSortBy(by string) func(a, b SortAndSearchAble) bool
func SearchName ¶
func SortByFunc ¶
func SortByFunc(datas []SortAndSearchAble, by string)
Types ¶
type PageData ¶
func NewPageDataFromContext
deprecated
func NewPageDataFromContextReflect ¶
NewPageDataFromContextReflect data 必须为一个实现 SortAndSearchAble 接口的list,其内部会自动进行 搜索 排序 分页
type SortAndSearchAble ¶
type TypedFilterFun ¶
type TypedPageData ¶
func NewTypedSearchSortPage ¶
func NewTypedSearchSortPage[T any](list []T, page, size int, pickfun func(item T) bool, sortfun func(a, b T) bool) TypedPageData[T]
func NewTypedSearchSortPageResourceFromContext ¶
func NewTypedSearchSortPageResourceFromContext[T any](c *gin.Context, list []T) TypedPageData[T]
type TypedSortFun ¶
Click to show internal directories.
Click to hide internal directories.