example

package
v4.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListLots

func ListLots(w http.ResponseWriter, r *http.Request)

Types

type ListLotsRequest

type ListLotsRequest struct {
	Search          *string `url:"search"`
	ModelFilter     *string `filter:"model"`
	MakerFilter     *string `filter:"maker"`
	PlatformInclude bool    `include:"platform"`
	// pagination parameters are specified explicitly and not provided as
	// ready to use structures for couple of reasons:
	// * specification is agnostic to pagination strategy and only SHOULDs
	//   us to use `page` field
	// * allows us to be spec compliant and fail if customer does not support
	//   `size` or any other subset of "common" parameters
	// * allows to use custom types for extended semantics, like
	//   `page[number]=(random|last|whatever)`
	PageNumber uint64 `page:"number"`
	PageSize   uint64 `page:"size"`
	// responsibility for handling both page[order] and sort params is on your service,
	// because different implementations can require different behaviours. (maybe it's temporary)
	PageOrder string      `page:"order"`
	Sort      urlval.Sort `sort:"a,b,-c"`
}

func NewListLotsRequest

func NewListLotsRequest(r *http.Request) (*ListLotsRequest, error)

Jump to

Keyboard shortcuts

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