Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PaginatedResults ¶
type PaginatedResults[T any] struct { Data []T `json:"data"` Total int64 `json:"total"` Offset int64 `json:"offset"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Data respjson.Field Total respjson.Field Offset respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` // contains filtered or unexported fields }
func (*PaginatedResults[T]) GetNextPage ¶
func (r *PaginatedResults[T]) GetNextPage() (res *PaginatedResults[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 (PaginatedResults[T]) RawJSON ¶
func (r PaginatedResults[T]) RawJSON() string
Returns the unmodified JSON received from the API
func (*PaginatedResults[T]) SetPageConfig ¶
func (r *PaginatedResults[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)
func (*PaginatedResults[T]) UnmarshalJSON ¶
func (r *PaginatedResults[T]) UnmarshalJSON(data []byte) error
type PaginatedResultsAutoPager ¶
type PaginatedResultsAutoPager[T any] struct { // contains filtered or unexported fields }
func NewPaginatedResultsAutoPager ¶
func NewPaginatedResultsAutoPager[T any](page *PaginatedResults[T], err error) *PaginatedResultsAutoPager[T]
func (*PaginatedResultsAutoPager[T]) Current ¶
func (r *PaginatedResultsAutoPager[T]) Current() T
func (*PaginatedResultsAutoPager[T]) Err ¶
func (r *PaginatedResultsAutoPager[T]) Err() error
func (*PaginatedResultsAutoPager[T]) Index ¶
func (r *PaginatedResultsAutoPager[T]) Index() int
func (*PaginatedResultsAutoPager[T]) Next ¶
func (r *PaginatedResultsAutoPager[T]) Next() bool
Click to show internal directories.
Click to hide internal directories.