pagination

package
v0.0.0-...-30e45d9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//ASC ascending order
	ASC = "asc"
	//DESC descending order
	DESC = "desc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Paginator

type Paginator struct {
	Key    string
	Order  string
	Limit  uint64
	Offset uint64
}

Paginator stores pagination data

func FromURLQuery

func FromURLQuery(s *schema.Schema, values url.Values) (pg *Paginator, err error)

FromURLQuery create Paginator from Query params

func NewPaginator

func NewPaginator(s *schema.Schema, key, order string, limit, offset uint64) (*Paginator, error)

NewPaginator create Paginator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL