pagination

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 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 ListObjects

type ListObjects[T any] struct {
	Objects []T             `json:"objects"`
	JSON    listObjectsJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*ListObjects[T]) GetNextPage

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

GetNextPage 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 (*ListObjects[T]) SetPageConfig

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

func (*ListObjects[T]) UnmarshalJSON

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

type ListObjectsAutoPager

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

func NewListObjectsAutoPager

func NewListObjectsAutoPager[T any](page *ListObjects[T], err error) *ListObjectsAutoPager[T]

func (*ListObjectsAutoPager[T]) Current

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

func (*ListObjectsAutoPager[T]) Err

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

func (*ListObjectsAutoPager[T]) Index

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

func (*ListObjectsAutoPager[T]) Next

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

Jump to

Keyboard shortcuts

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