pagination

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CursorLimitPagination

type CursorLimitPagination[T any] struct {
	Result     []T                             `json:"result"`
	ResultInfo CursorLimitPaginationResultInfo `json:"result_info"`
	JSON       cursorLimitPaginationJSON       `json:"-"`
	// contains filtered or unexported fields
}

func (*CursorLimitPagination[T]) GetNextPage

func (r *CursorLimitPagination[T]) GetNextPage() (res *CursorLimitPagination[T], err error)

NextPage 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 (*CursorLimitPagination[T]) SetPageConfig

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

func (*CursorLimitPagination[T]) UnmarshalJSON

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

type CursorLimitPaginationAutoPager

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

func NewCursorLimitPaginationAutoPager

func NewCursorLimitPaginationAutoPager[T any](page *CursorLimitPagination[T], err error) *CursorLimitPaginationAutoPager[T]

func (*CursorLimitPaginationAutoPager[T]) Current

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

func (*CursorLimitPaginationAutoPager[T]) Err

func (*CursorLimitPaginationAutoPager[T]) Index

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

func (*CursorLimitPaginationAutoPager[T]) Next

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

type CursorLimitPaginationResultInfo

type CursorLimitPaginationResultInfo struct {
	Count   int64                               `json:"count"`
	Cursor  string                              `json:"cursor"`
	PerPage int64                               `json:"per_page"`
	JSON    cursorLimitPaginationResultInfoJSON `json:"-"`
}

func (*CursorLimitPaginationResultInfo) UnmarshalJSON

func (r *CursorLimitPaginationResultInfo) UnmarshalJSON(data []byte) (err error)

type CursorPagination

type CursorPagination[T any] struct {
	Result     []T                        `json:"result"`
	ResultInfo CursorPaginationResultInfo `json:"result_info"`
	JSON       cursorPaginationJSON       `json:"-"`
	// contains filtered or unexported fields
}

func (*CursorPagination[T]) GetNextPage

func (r *CursorPagination[T]) GetNextPage() (res *CursorPagination[T], err error)

NextPage 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 (*CursorPagination[T]) SetPageConfig

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

func (*CursorPagination[T]) UnmarshalJSON

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

type CursorPaginationAutoPager

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

func NewCursorPaginationAutoPager

func NewCursorPaginationAutoPager[T any](page *CursorPagination[T], err error) *CursorPaginationAutoPager[T]

func (*CursorPaginationAutoPager[T]) Current

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

func (*CursorPaginationAutoPager[T]) Err

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

func (*CursorPaginationAutoPager[T]) Index

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

func (*CursorPaginationAutoPager[T]) Next

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

type CursorPaginationResultInfo

type CursorPaginationResultInfo struct {
	Count   int64                          `json:"count"`
	Cursor  string                         `json:"cursor"`
	PerPage int64                          `json:"per_page"`
	JSON    cursorPaginationResultInfoJSON `json:"-"`
}

func (*CursorPaginationResultInfo) UnmarshalJSON

func (r *CursorPaginationResultInfo) UnmarshalJSON(data []byte) (err error)

type SinglePage

type SinglePage[T any] struct {
	Result []T            `json:"result"`
	JSON   singlePageJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*SinglePage[T]) GetNextPage

func (r *SinglePage[T]) GetNextPage() (res *SinglePage[T], err error)

NextPage 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 (*SinglePage[T]) SetPageConfig

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

func (*SinglePage[T]) UnmarshalJSON

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

type SinglePageAutoPager

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

func NewSinglePageAutoPager

func NewSinglePageAutoPager[T any](page *SinglePage[T], err error) *SinglePageAutoPager[T]

func (*SinglePageAutoPager[T]) Current

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

func (*SinglePageAutoPager[T]) Err

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

func (*SinglePageAutoPager[T]) Index

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

func (*SinglePageAutoPager[T]) Next

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

type V4PagePagination

type V4PagePagination[T any] struct {
	Result     V4PagePaginationResult[T]  `json:"result"`
	ResultInfo V4PagePaginationResultInfo `json:"result_info"`
	JSON       v4PagePaginationJSON       `json:"-"`
	// contains filtered or unexported fields
}

func (*V4PagePagination[T]) GetNextPage

func (r *V4PagePagination[T]) GetNextPage() (res *V4PagePagination[T], err error)

NextPage 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 (*V4PagePagination[T]) SetPageConfig

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

func (*V4PagePagination[T]) UnmarshalJSON

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

type V4PagePaginationArray

type V4PagePaginationArray[T any] struct {
	Result     []T                             `json:"result"`
	ResultInfo V4PagePaginationArrayResultInfo `json:"result_info"`
	JSON       v4PagePaginationArrayJSON       `json:"-"`
	// contains filtered or unexported fields
}

func (*V4PagePaginationArray[T]) GetNextPage

func (r *V4PagePaginationArray[T]) GetNextPage() (res *V4PagePaginationArray[T], err error)

NextPage 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 (*V4PagePaginationArray[T]) SetPageConfig

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

func (*V4PagePaginationArray[T]) UnmarshalJSON

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

type V4PagePaginationArrayAutoPager

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

func NewV4PagePaginationArrayAutoPager

func NewV4PagePaginationArrayAutoPager[T any](page *V4PagePaginationArray[T], err error) *V4PagePaginationArrayAutoPager[T]

func (*V4PagePaginationArrayAutoPager[T]) Current

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

func (*V4PagePaginationArrayAutoPager[T]) Err

func (*V4PagePaginationArrayAutoPager[T]) Index

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

func (*V4PagePaginationArrayAutoPager[T]) Next

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

type V4PagePaginationArrayResultInfo

type V4PagePaginationArrayResultInfo struct {
	Page    int64                               `json:"page"`
	PerPage int64                               `json:"per_page"`
	JSON    v4PagePaginationArrayResultInfoJSON `json:"-"`
}

func (*V4PagePaginationArrayResultInfo) UnmarshalJSON

func (r *V4PagePaginationArrayResultInfo) UnmarshalJSON(data []byte) (err error)

type V4PagePaginationAutoPager

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

func NewV4PagePaginationAutoPager

func NewV4PagePaginationAutoPager[T any](page *V4PagePagination[T], err error) *V4PagePaginationAutoPager[T]

func (*V4PagePaginationAutoPager[T]) Current

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

func (*V4PagePaginationAutoPager[T]) Err

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

func (*V4PagePaginationAutoPager[T]) Index

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

func (*V4PagePaginationAutoPager[T]) Next

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

type V4PagePaginationResult

type V4PagePaginationResult[T any] struct {
	Items []T                        `json:"items"`
	JSON  v4PagePaginationResultJSON `json:"-"`
}

func (*V4PagePaginationResult[T]) UnmarshalJSON

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

type V4PagePaginationResultInfo

type V4PagePaginationResultInfo struct {
	Page    int64                          `json:"page"`
	PerPage int64                          `json:"per_page"`
	JSON    v4PagePaginationResultInfoJSON `json:"-"`
}

func (*V4PagePaginationResultInfo) UnmarshalJSON

func (r *V4PagePaginationResultInfo) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

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