pagination

package module
v0.0.0-...-b241907 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: MIT Imports: 2 Imported by: 0

README

go-pagination

Build GoDoc Go Report Card FOSSA Status

go-pagination is a simple pagination token generator

Issues

  • None

License

MIT Licensed

Documentation

Overview

Package pagination is a simple pagination token generator

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Page

type Page struct {
	OffsetID        string `json:"offset_id"`
	OffsetTimeAtUTC int64  `json:"offset_time_at_utc"`
	PageSize        int64  `json:"page_size"`
}

Page represents the next page for the query

func (Page) Encode

func (p Page) Encode() Token

Encode returns the Token type for a page

type Token

type Token string

Token represents the encoded pagination

func (Token) Decode

func (t Token) Decode() Page

Decode returns the Page for a given token

Jump to

Keyboard shortcuts

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