pagination

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2019 License: MIT Imports: 9 Imported by: 0

README

pagination

GoDoc

Pagination helpers for our backends.

Basic usage
import (
  "libs.altipla.consulting/pagination"
)

Documentation

Overview

Package pagination implements a pager that stores the state in a proto token and uses the altipla-consulting/database API.

Index

Constants

View Source
const DefaultPageSize = 50

Variables

This section is empty.

Functions

This section is empty.

Types

type Pager

type Pager struct {
	NextPageToken string
	TotalSize     int32
	// contains filtered or unexported fields
}

func NewPager

func NewPager(c *database.Collection) *Pager

func (*Pager) Fetch

func (pager *Pager) Fetch(models interface{}) error

func (*Pager) RegisterParam

func (pager *Pager) RegisterParam(key string, value interface{})

func (*Pager) SetInputs

func (pager *Pager) SetInputs(pageToken string, pageSize int32)

Jump to

Keyboard shortcuts

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