Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeFilter ¶
func DecodeFilter(criteria ...filtering.FilterDecoder) func(*Decoder)
DecodeFilter set criteria to filter
func DecodeLimit ¶
DecodeLimit set the paging limit default.
func DecodeMaxAllowedLimit ¶
DecodeMaxAllowedLimit set the max allowed limit default.
func DecodeSort ¶
DecodeSort set criteria to sort
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
A Decoder reads and decodes Listing values from url.Values.
func NewDecoder ¶
NewDecoder returns a new decoder that reads from params.
type Listing ¶
type Listing struct { Paging paging.Paging `json:"paging,omitempty"` Sorting *sorting.Sorting `json:"sorting,omitempty"` Filtering *filtering.Filtering `json:"filtering,omitempty"` }
Listing holds the info to perform filtering, sorting and paging over a collection.
func (Listing) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
Click to show internal directories.
Click to hide internal directories.