pagination
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeCursorPage¶
type CursorPage[Tany] struct {Data []T `json:"data"`HasMorebool `json:"has_more"`// JSON contains metadata for fields, check presence with [respjson.Field.Valid].JSON struct {Datarespjson.FieldHasMorerespjson.FieldExtraFields map[string]respjson.Field// contains filtered or unexported fields} `json:"-"`// contains filtered or unexported fields}
func (*CursorPage[T])GetNextPage¶
func (r *CursorPage[T]) GetNextPage() (res *CursorPage[T], errerror)
GetNextPage returns the next page as defined by this pagination style. Whenthere is no next page, this function will return a 'nil' for the page value, butwill not return an error
func (CursorPage[T])RawJSON¶
func (rCursorPage[T]) RawJSON()string
Returns the unmodified JSON received from the API
func (*CursorPage[T])SetPageConfig¶
func (r *CursorPage[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)
func (*CursorPage[T])UnmarshalJSON¶
func (r *CursorPage[T]) UnmarshalJSON(data []byte)error
typeCursorPageAutoPager¶
type CursorPageAutoPager[Tany] struct {// contains filtered or unexported fields}
funcNewCursorPageAutoPager¶
func NewCursorPageAutoPager[Tany](page *CursorPage[T], errerror) *CursorPageAutoPager[T]
func (*CursorPageAutoPager[T])Current¶
func (r *CursorPageAutoPager[T]) Current() T
func (*CursorPageAutoPager[T])Err¶
func (r *CursorPageAutoPager[T]) Err()error
func (*CursorPageAutoPager[T])Index¶
func (r *CursorPageAutoPager[T]) Index()int
func (*CursorPageAutoPager[T])Next¶
func (r *CursorPageAutoPager[T]) Next()bool
typePage¶
type Page[Tany] struct {Data []T `json:"data"`Objectstring `json:"object,required"`// JSON contains metadata for fields, check presence with [respjson.Field.Valid].JSON struct {Datarespjson.FieldObjectrespjson.FieldExtraFields map[string]respjson.Field// contains filtered or unexported fields} `json:"-"`// contains filtered or unexported fields}
func (*Page[T])GetNextPage¶
GetNextPage returns the next page as defined by this pagination style. Whenthere is no next page, this function will return a 'nil' for the page value, butwill not return an error
func (*Page[T])SetPageConfig¶
func (r *Page[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)
func (*Page[T])UnmarshalJSON¶
typePageAutoPager¶
type PageAutoPager[Tany] struct {// contains filtered or unexported fields}
funcNewPageAutoPager¶
func NewPageAutoPager[Tany](page *Page[T], errerror) *PageAutoPager[T]
func (*PageAutoPager[T])Current¶
func (r *PageAutoPager[T]) Current() T
func (*PageAutoPager[T])Err¶
func (r *PageAutoPager[T]) Err()error
func (*PageAutoPager[T])Index¶
func (r *PageAutoPager[T]) Index()int
func (*PageAutoPager[T])Next¶
func (r *PageAutoPager[T]) Next()bool