pagination

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CursorPage

type CursorPage[T any] struct {
	Data    []T            `json:"data"`
	HasMore bool           `json:"has_more,required"`
	JSON    cursorPageJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*CursorPage[T]) GetNextPage

func (r *CursorPage[T]) GetNextPage() (res *CursorPage[T], err error)

NextPage returns the next page as defined by this pagination style. When there is no next page, this function will return a 'nil' for the page value, but will not return an error

func (*CursorPage[T]) SetPageConfig

func (r *CursorPage[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)

func (*CursorPage[T]) UnmarshalJSON

func (r *CursorPage[T]) UnmarshalJSON(data []byte) (err error)

type CursorPageAutoPager

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

func NewCursorPageAutoPager

func NewCursorPageAutoPager[T any](page *CursorPage[T], err error) *CursorPageAutoPager[T]

func (*CursorPageAutoPager[T]) Current

func (r *CursorPageAutoPager[T]) Current() T

func (*CursorPageAutoPager[T]) Err

func (r *CursorPageAutoPager[T]) Err() error

func (*CursorPageAutoPager[T]) Index

func (r *CursorPageAutoPager[T]) Index() int

func (*CursorPageAutoPager[T]) Next

func (r *CursorPageAutoPager[T]) Next() bool

type SinglePage

type SinglePage[T any] struct {
	Data    []T            `json:"data"`
	HasMore bool           `json:"has_more,required"`
	JSON    singlePageJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*SinglePage[T]) GetNextPage

func (r *SinglePage[T]) GetNextPage() (res *SinglePage[T], err error)

NextPage returns the next page as defined by this pagination style. When there is no next page, this function will return a 'nil' for the page value, but will not return an error

func (*SinglePage[T]) SetPageConfig

func (r *SinglePage[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)

func (*SinglePage[T]) UnmarshalJSON

func (r *SinglePage[T]) UnmarshalJSON(data []byte) (err error)

type SinglePageAutoPager

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

func NewSinglePageAutoPager

func NewSinglePageAutoPager[T any](page *SinglePage[T], err error) *SinglePageAutoPager[T]

func (*SinglePageAutoPager[T]) Current

func (r *SinglePageAutoPager[T]) Current() T

func (*SinglePageAutoPager[T]) Err

func (r *SinglePageAutoPager[T]) Err() error

func (*SinglePageAutoPager[T]) Index

func (r *SinglePageAutoPager[T]) Index() int

func (*SinglePageAutoPager[T]) Next

func (r *SinglePageAutoPager[T]) Next() bool

Jump to

Keyboard shortcuts

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