Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PaginationTemplate = map[string]interface{}{
"limit": "int~Limit has to be a number",
"offset": "int~Offset has to be a number",
}
PaginationTemplate contains validation for Pagination components
Functions ¶
func DecodeValidRequest ¶
DecodeValidRequest validates input maps (From Query.URL, or decoded Json Body) against template and returns typed structure srcs can be list of either map[string]interface{} or map[string][]string
func LowerCaseKeys ¶
LowerCaseKeys returns new map with keys changed to lowercase
Types ¶
type Pagination ¶
type Pagination struct { Limit int `schema:"limit" valid:"type(int)~Limit has to be a number"` Offset int `schema:"offset" valid:"type(int)~Offset has to be a number"` }
Pagination defines type safe Pagination request components
Click to show internal directories.
Click to hide internal directories.