pages

package
v0.0.0-...-fdf5f90 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitset

type Bitset struct {
	Bits []uint64
}

func NewBitset

func NewBitset() *Bitset

func (Bitset) Has

func (b Bitset) Has(n int) bool

func (*Bitset) Set

func (b *Bitset) Set(n int)

type Cursor

type Cursor string

func GenCursor

func GenCursor() Cursor

type Identifier

type Identifier[T any] interface {
	GetPrefix() string
	GetID(T) int32
}

type Paginator

type Paginator[T any] struct {
	Identifier Identifier[T]
	// contains filtered or unexported fields
}

func NewPaginator

func NewPaginator[T any](id Identifier[T], db db.KVDBer) *Paginator[T]

func (Paginator[T]) Add

func (Paginator[T]) Add(i T)

func (*Paginator[T]) Close

func (p *Paginator[T]) Close() error

func (*Paginator[T]) Init

func (p *Paginator[T]) Init(ctx context.Context, c Cursor) error

Jump to

Keyboard shortcuts

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