paginate

package
v0.2.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InvalidTokenErr = status.Errorf(
	codes.InvalidArgument,
	"The field `page_token` is invalid.")

InvalidTokenErr is the error returned if the token provided is not parseable by the TokenGenerator.

Functions

This section is empty.

Types

type TokenGenerator

type TokenGenerator interface {
	Encode(uint64) string
	Decode(string) (uint64, error)
}

TokenGenerator generates a page token for a given index.

func TokenGeneratorWithSalt

func TokenGeneratorWithSalt(salt string) TokenGenerator

Jump to

Keyboard shortcuts

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