Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultPage defines the page number if none is set. DefaultPage = 1 // DefaultLimit defines how many items will be returned if // the limit is set to list all. DefaultLimit = 15 // DefaultOrderBy defines the default order by if an error // occurred. DefaultOrderBy = "id" // DefaultOrderDirection defines the default order direction // if an error occurred. DefaultOrderDirection = "DESC" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Defaults ¶
type Defaults struct {
Page int `json:"page"`
Limit interface{} `json:"limit"`
OrderBy string `json:"order_by"`
OrderDirection string `json:"order_direction"`
}
Defaults represents the default configuration for obtaining params.
type Params ¶
type Params struct {
Page int `json:"page"`
Limit int `json:"limit"`
LimitAll bool `json:"all"`
OrderBy string `json:"order_by"`
OrderDirection string `json:"order_direction"`
Filters Filters `json:"-"`
Stringer `json:"-"`
// contains filtered or unexported fields
}
Params represents the http params for interacting with the DB
Click to show internal directories.
Click to hide internal directories.