Documentation
¶
Index ¶
Constants ¶
View Source
const ( MinPageSize = 10 MaxPageSize = 50 )
Variables ¶
View Source
var (
ErrBadSortAttribute = errors.New("bad sorting attribute")
)
Functions ¶
func DropSchema ¶
func RegisterModels ¶ added in v0.0.5
func RegisterModels(objs ...interface{})
Types ¶
type Pagination ¶ added in v0.0.6
type Pagination struct {
Limit int `json:"limit,omitempty" form:"limit"`
Offset int `json:"offset,omitempty" form:"offset"`
Sort string `json:"sort,omitempty" form:"sort"`
SortDesc bool `json:"sort_desc" form:"sort_desc"`
TotalRows int64 `json:"total_rows"`
Rows interface{} `json:"rows"`
}
func (*Pagination) GetLimit ¶ added in v0.0.6
func (p *Pagination) GetLimit() int
func (*Pagination) GetOffset ¶ added in v0.0.10
func (p *Pagination) GetOffset() int
func (*Pagination) GetSort ¶ added in v0.0.6
func (p *Pagination) GetSort() interface{}
func (*Pagination) SetTotalRows ¶ added in v0.0.10
func (p *Pagination) SetTotalRows(rows int64)
Click to show internal directories.
Click to hide internal directories.