page

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2017 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	Start          int    `json:"start"`
	Length         int    `json:"legth"`
	HasMore        bool   `json:"-"`
	SortDescending bool   `json:"-"`
	SortBy         string `json:"-"`
}

Page represents the details of a request for a specific page in a collection of entities.

func FromQueryString

func FromQueryString(u *url.URL, sortFields []string, defaultDescending bool) Page

FromQueryString returns a Page filled with values from the given URL's query string.

func (*Page) FromQueryString

func (p *Page) FromQueryString(u *url.URL, sortFields []string)

FromQueryString fills this Page's fields with values from the given URL's query string.

func (Page) QueryString

func (p Page) QueryString() string

QueryString returns the query string to retrieve this Page.

Jump to

Keyboard shortcuts

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