pagination

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

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

Jump to

Keyboard shortcuts

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