Discover Packages
github.com/andersnormal/iterator
package
module
Version:
v0.0.0-...-13b37e7
Opens a new window with list of versions in this module.
Published: Dec 22, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Expand ▾
Collapse ▴
Documentation
¶
Package iterator is a simple implementation
of a page iterator. Which also encodes page tokens
for easily walk for results.
View Source
var (
ErrPositiveSize = errors .New ("iterator: page size must be positive")
ErrBufferNotEmpty = errors .New ("pager: must call NextPage with an empty buffer")
ErrNilNextPage = errors .New ("pager: nil passed to Pager.NextPage")
)
type Iterator struct {
MaxSize int
Token string
}
Iterator represents the state of an iterator
type Pageable interface {
Iterator() *Iterator
}
Pageable is implemented by iterators that support paging.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.