query

package
v4.78.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: MIT Imports: 6 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidValue        = errors.New("invalid value")
	ErrMaxPageSizeExceeded = errors.New("maximum page size exceeded")
	ErrPageSizeInvalid     = errors.New("page size must be greater than zero")
)

Functions

func GetBool

func GetBool(r *http.Request, name string) bool

func GetIP added in v4.71.1

func GetIP(r *http.Request) string

Types

type Pagination

type Pagination struct {
	Last     string
	Sort     string
	PageSize uint
	Desc     bool
}

func ParsePagination

func ParsePagination(r *http.Request, defaultPageSize, maxPageSize uint) (pagination Pagination, err error)

func (Pagination) LinkNextHeader added in v4.12.0

func (p Pagination) LinkNextHeader(urlPath string, extraArgs url.Values) string

Jump to

Keyboard shortcuts

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