Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFieldByJsonTag ¶
func GetFieldByJsonTag(jsonTagValue string, s interface{}) (reflect.StructField, error)
GetFieldByJsonTag returns the field name as a string from the json value supplied by the request query params
Types ¶
type LessFunc ¶
type LessFunc func(p1, p2 *models.UserParams) bool
LessFunc used by MultiSorter OrderedBy used to hold the seq of sort
func GetLessFunc ¶
GetLessFunc supplies the output function from the
type MultiSorter ¶
type MultiSorter struct {
// contains filtered or unexported fields
}
MultiSorter structure to hold input array and the rwquest query parameters converted see GetLessFunc
func OrderedBy ¶
func OrderedBy(less ...LessFunc) *MultiSorter
OrderedBy some description of the function
func (*MultiSorter) Len ¶
func (ms *MultiSorter) Len() int
Len function to produce length of changes required by Sort third party
func (*MultiSorter) Less ¶
func (ms *MultiSorter) Less(i, j int) bool
Less either swaps the two concurrent values by the sort rules
func (*MultiSorter) Sort ¶
func (ms *MultiSorter) Sort(changes []models.UserParams)
Sort some description of the function
func (*MultiSorter) Swap ¶
func (ms *MultiSorter) Swap(i, j int)
Swap ms called by sort to swap two records by sort parameters
Click to show internal directories.
Click to hide internal directories.