sort

package
v2.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultParser = RequestQueryParser{}

Functions

func ParseQuery

func ParseQuery(params map[string]string) ([]query.Sort, error)

ParseQuery parses the JSON:API sort query parameters into a list of sort criteria.

Types

type RequestQueryParser

type RequestQueryParser struct{}

RequestQueryParser parses the JSON:API sort query parameters of an http request.

func NewRequestQueryParser

func NewRequestQueryParser(options ...func(*RequestQueryParser)) RequestQueryParser

NewRequestQueryParser creates a new RequestQueryParser.

func (RequestQueryParser) ParseSortQuery

func (rq RequestQueryParser) ParseSortQuery(r *http.Request) ([]query.Sort, error)

ParseSortQuery parses the JSON:API sort query parameters of an http request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL