Documentation ¶
Index ¶
- func BindJSON(w http.ResponseWriter, r *http.Request, dst interface{}) error
- func BindJSONObject(w http.ResponseWriter, r *http.Request) (gjson.Result, error)
- func Body(w http.ResponseWriter, r *http.Request) ([]byte, error)
- func DefaultQuery(r *http.Request, key, defaultValue string) string
- func DefaultQueryFloat(r *http.Request, key string, defaultValue float64) float64
- func DefaultQueryInt(r *http.Request, key string, defaultValue int) int
- func Param(r *http.Request, key string) string
- func ParamFloat(r *http.Request, key string) (float64, error)
- func ParamInt(r *http.Request, key string) (int, error)
- func Query(r *http.Request, key string) string
- func QueryAll(r *http.Request, key string) []string
- func QueryFloat(r *http.Request, key string) (float64, error)
- func QueryHas(r *http.Request, key string) bool
- func QueryInt(r *http.Request, key string) (int, error)
- type PageRequest
- type SortRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BindJSONObject ¶
func DefaultQueryFloat ¶
Types ¶
type PageRequest ¶
type PageRequest struct { Page int `json:"page"` Size int `json:"size"` Offset int `json:"offset"` }
Based on: https://jsonapi.org/profiles/ethanresnick/cursor-pagination https://github.com/emicklei/go-restful/blob/master/request.go#L55
func NewPage ¶
func NewPage(r *http.Request) *PageRequest
type SortRequest ¶
func NewSort ¶
func NewSort(r *http.Request) []*SortRequest
Click to show internal directories.
Click to hide internal directories.