Documentation ¶
Index ¶
- func NewPaginator(pageSize, page int, sort []string, sortSafeMap map[string]bool) *paginator
- func QueryInt(r *http.Request, key string, defaultValue int) (int, error)
- func QueryParameter(r *http.Request, key string) string
- func QueryString(r *http.Request, key string, defaultValue string) (string, error)
- func QueryStrings(r *http.Request, key string, defaultValue string) ([]string, error)
- func ReadJSON(w http.ResponseWriter, r *http.Request, dst interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPaginator ¶
func QueryInt ¶
QueryInt parses an integer from a query parameter. Returns defaultValue if the query parameter was empty, because query parameters are always optional.
func QueryParameter ¶
QueryParameter extracts a given key from query parameters. Returns an empty string if parameters wasn't found
func QueryString ¶
QueryString parses a string from a query parameter. Returns defaultValue if the query parameter was empty, because query parameters are always optional.
func QueryStrings ¶
QueryString parses strings from a query parameter. Returns defaultValue if the query parameter was empty, because query parameters are always optional.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.