pagination

package
v0.0.0-...-ba645fd Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiCollectionResult

type ApiCollectionResult struct {
	TotalCount int         `json:"total_count"`
	Result     interface{} `json:"result"`
}

type ApiPagiationResult

type ApiPagiationResult struct {
	Pagination Pagination  `json:"meta"`
	Data       interface{} `json:"data"`
}

type Pagination

type Pagination struct {
	Page       int `json:"page"`
	PerPage    int `json:"per_page"`
	TotalCount int `json:"total_count"`
	TotalPage  int `json:"total_page"`
}

func FromContext

func FromContext(c *napnap.Context) Pagination

func (*Pagination) SetTotalCountAndPage

func (p *Pagination) SetTotalCountAndPage(total int)

func (*Pagination) Skip

func (p *Pagination) Skip() int

Jump to

Keyboard shortcuts

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