pagination

package
v0.114.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 7 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OffsetPagination

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

func (*OffsetPagination[T]) GetNextPage

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

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

Returns the unmodified JSON received from the API

func (*OffsetPagination[T]) SetPageConfig

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

func (*OffsetPagination[T]) UnmarshalJSON

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

type OffsetPaginationAutoPager

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

func NewOffsetPaginationAutoPager

func NewOffsetPaginationAutoPager[T any](page *OffsetPagination[T], err error) *OffsetPaginationAutoPager[T]

func (*OffsetPaginationAutoPager[T]) Current

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

func (*OffsetPaginationAutoPager[T]) Err

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

func (*OffsetPaginationAutoPager[T]) Index

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

func (*OffsetPaginationAutoPager[T]) Next

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

type PageTokenPagination added in v0.71.0

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

func (*PageTokenPagination[T]) GetNextPage added in v0.71.0

func (r *PageTokenPagination[T]) GetNextPage() (res *PageTokenPagination[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 (PageTokenPagination[T]) RawJSON added in v0.71.0

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

Returns the unmodified JSON received from the API

func (*PageTokenPagination[T]) SetPageConfig added in v0.71.0

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

func (*PageTokenPagination[T]) UnmarshalJSON added in v0.71.0

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

type PageTokenPaginationAutoPager added in v0.71.0

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

func NewPageTokenPaginationAutoPager added in v0.71.0

func NewPageTokenPaginationAutoPager[T any](page *PageTokenPagination[T], err error) *PageTokenPaginationAutoPager[T]

func (*PageTokenPaginationAutoPager[T]) Current added in v0.71.0

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

func (*PageTokenPaginationAutoPager[T]) Err added in v0.71.0

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

func (*PageTokenPaginationAutoPager[T]) Index added in v0.71.0

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

func (*PageTokenPaginationAutoPager[T]) Next added in v0.71.0

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

Jump to

Keyboard shortcuts

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