pagination

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2025 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 CursorNoLimit

type CursorNoLimit[T any] struct {
	Items        []T    `json:"items"`
	HasMore      bool   `json:"hasMore"`
	OldestCursor string `json:"oldestCursor,nullable"`
	NewestCursor string `json:"newestCursor,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items        respjson.Field
		HasMore      respjson.Field
		OldestCursor respjson.Field
		NewestCursor respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	// contains filtered or unexported fields
}

func (*CursorNoLimit[T]) GetNextPage

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

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

Returns the unmodified JSON received from the API

func (*CursorNoLimit[T]) SetPageConfig

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

func (*CursorNoLimit[T]) UnmarshalJSON

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

type CursorNoLimitAutoPager

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

func NewCursorNoLimitAutoPager

func NewCursorNoLimitAutoPager[T any](page *CursorNoLimit[T], err error) *CursorNoLimitAutoPager[T]

func (*CursorNoLimitAutoPager[T]) Current

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

func (*CursorNoLimitAutoPager[T]) Err

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

func (*CursorNoLimitAutoPager[T]) Index

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

func (*CursorNoLimitAutoPager[T]) Next

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

type CursorSearch

type CursorSearch[T any] struct {
	Items        []T    `json:"items"`
	HasMore      bool   `json:"hasMore"`
	OldestCursor string `json:"oldestCursor,nullable"`
	NewestCursor string `json:"newestCursor,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Items        respjson.Field
		HasMore      respjson.Field
		OldestCursor respjson.Field
		NewestCursor respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
	// contains filtered or unexported fields
}

func (*CursorSearch[T]) GetNextPage

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

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

Returns the unmodified JSON received from the API

func (*CursorSearch[T]) SetPageConfig

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

func (*CursorSearch[T]) UnmarshalJSON

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

type CursorSearchAutoPager

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

func NewCursorSearchAutoPager

func NewCursorSearchAutoPager[T any](page *CursorSearch[T], err error) *CursorSearchAutoPager[T]

func (*CursorSearchAutoPager[T]) Current

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

func (*CursorSearchAutoPager[T]) Err

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

func (*CursorSearchAutoPager[T]) Index

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

func (*CursorSearchAutoPager[T]) Next

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

type CursorSortKey

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

func (*CursorSortKey[T]) GetNextPage

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

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

Returns the unmodified JSON received from the API

func (*CursorSortKey[T]) SetPageConfig

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

func (*CursorSortKey[T]) UnmarshalJSON

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

type CursorSortKeyAutoPager

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

func NewCursorSortKeyAutoPager

func NewCursorSortKeyAutoPager[T any](page *CursorSortKey[T], err error) *CursorSortKeyAutoPager[T]

func (*CursorSortKeyAutoPager[T]) Current

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

func (*CursorSortKeyAutoPager[T]) Err

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

func (*CursorSortKeyAutoPager[T]) Index

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

func (*CursorSortKeyAutoPager[T]) Next

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

Jump to

Keyboard shortcuts

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