Categorygithub.com/aaronland/go-pagination
modulepackage
0.3.0
Repository: https://github.com/aaronland/go-pagination.git
Documentation: pkg.go.dev

# README

go-pagination

Go package implementing common interfaces for paginating queries and query results.

Important

This is work in progress. Things are starting to settle down but may still be subject to change.

Documentation

Go Reference

Documentation is incomplete at this time.

# Packages

package countable provides implementions of the pagintion.Options and pagination.Results interfaces for use with page-based or numbered pagination.
package cursor provides implementions of the pagintion.Options and pagination.Results interfaces for use with cursor or token-based pagination.

# Functions

PagesForCount returns the number of pages that total_count will span using criteria defined in opts.

# Constants

Countable is a page-based or numbered pagination implementation.
Cursor is a token or cursor-based pagination implementation where the total number of results is unknown.

# Interfaces

Options provides a common interface for criteria used to paginate a query.
Results provides an interface for pagination information for a query response.

# Type aliases

Method defines the type of pagination Options or Results.