Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Page ¶ added in v0.14.0
type Page[T any] struct { Data []T `json:"data"` NextCursor string `json:"next_cursor"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field NextCursor respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` // contains filtered or unexported fields }
func (*Page[T]) GetNextPage ¶ added in v0.14.0
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 (*Page[T]) SetPageConfig ¶ added in v0.14.0
func (r *Page[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)
func (*Page[T]) UnmarshalJSON ¶ added in v0.14.0
type PageAutoPager ¶ added in v0.14.0
type PageAutoPager[T any] struct { // contains filtered or unexported fields }
func NewPageAutoPager ¶ added in v0.14.0
func NewPageAutoPager[T any](page *Page[T], err error) *PageAutoPager[T]
func (*PageAutoPager[T]) Current ¶ added in v0.14.0
func (r *PageAutoPager[T]) Current() T
func (*PageAutoPager[T]) Err ¶ added in v0.14.0
func (r *PageAutoPager[T]) Err() error
func (*PageAutoPager[T]) Index ¶ added in v0.14.0
func (r *PageAutoPager[T]) Index() int
func (*PageAutoPager[T]) Next ¶ added in v0.14.0
func (r *PageAutoPager[T]) Next() bool
Click to show internal directories.
Click to hide internal directories.