pagination

package
v0.0.3-beta Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CursorIDPage

type CursorIDPage[T any] struct {
	Data []T `json:"data"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	// contains filtered or unexported fields
}

func (*CursorIDPage[T]) GetNextPage

func (r *CursorIDPage[T]) GetNextPage() (res *CursorIDPage[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 (CursorIDPage[T]) RawJSON

func (r CursorIDPage[T]) RawJSON() string

Returns the unmodified JSON received from the API

func (*CursorIDPage[T]) SetPageConfig

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

func (*CursorIDPage[T]) UnmarshalJSON

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

type CursorIDPageAutoPager

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

func NewCursorIDPageAutoPager

func NewCursorIDPageAutoPager[T any](page *CursorIDPage[T], err error) *CursorIDPageAutoPager[T]

func (*CursorIDPageAutoPager[T]) Current

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

func (*CursorIDPageAutoPager[T]) Err

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

func (*CursorIDPageAutoPager[T]) Index

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

func (*CursorIDPageAutoPager[T]) Next

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

Jump to

Keyboard shortcuts

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