Documentation ¶
Index ¶
- type DataPageOpsImpl
- func (paging *DataPageOpsImpl[T]) CurrentPage(currentPage int) *DataPageOpsImpl[T]
- func (paging *DataPageOpsImpl[T]) Fetch() *PageEntityRes[T]
- func (paging *DataPageOpsImpl[T]) Limit() int
- func (paging *DataPageOpsImpl[T]) Offset() int
- func (paging *DataPageOpsImpl[T]) PerPageItems(perPageItems int) *DataPageOpsImpl[T]
- type PageEntityRes
- type PageOpsImpl
- func (paging *PageOpsImpl[T, V, Z]) Converter(f func(ctx context.Context, source *[]Z, target *[]T)) *PageOpsImpl[T, V, Z]
- func (paging *PageOpsImpl[T, V, Z]) Ctx(ctx context.Context) *PageOpsImpl[T, V, Z]
- func (paging *PageOpsImpl[T, V, Z]) CurrentPage(currentPage int) *PageOpsImpl[T, V, Z]
- func (paging *PageOpsImpl[T, V, Z]) Fetch() (*PageEntityRes[T], error)
- func (paging *PageOpsImpl[T, V, Z]) Limit() int
- func (paging *PageOpsImpl[T, V, Z]) Offset() int
- func (paging *PageOpsImpl[T, V, Z]) Params(params *V) *PageOpsImpl[T, V, Z]
- func (paging *PageOpsImpl[T, V, Z]) PerPageItems(perPageItems int) *PageOpsImpl[T, V, Z]
- func (paging *PageOpsImpl[T, V, Z]) Query(...) *PageOpsImpl[T, V, Z]
- type SimplePageOpsImpl
- func (paging *SimplePageOpsImpl[T]) Fetch() *PageEntityRes[T]
- func (paging *SimplePageOpsImpl[T]) Limit() int
- func (paging *SimplePageOpsImpl[T]) Offset() int
- func (paging *SimplePageOpsImpl[T]) PageData(totalItems int, pageData *[]T) *SimplePageOpsImpl[T]
- func (paging *SimplePageOpsImpl[T]) PageModels(totalItems int, modelsPtr any) *SimplePageOpsImpl[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataPageOpsImpl ¶
type DataPageOpsImpl[T any] struct { // contains filtered or unexported fields }
func DataPaging ¶
func DataPaging[T any](pageData *[]T) *DataPageOpsImpl[T]
func (*DataPageOpsImpl[T]) CurrentPage ¶
func (paging *DataPageOpsImpl[T]) CurrentPage(currentPage int) *DataPageOpsImpl[T]
func (*DataPageOpsImpl[T]) Fetch ¶
func (paging *DataPageOpsImpl[T]) Fetch() *PageEntityRes[T]
func (*DataPageOpsImpl[T]) Limit ¶
func (paging *DataPageOpsImpl[T]) Limit() int
func (*DataPageOpsImpl[T]) Offset ¶
func (paging *DataPageOpsImpl[T]) Offset() int
func (*DataPageOpsImpl[T]) PerPageItems ¶
func (paging *DataPageOpsImpl[T]) PerPageItems(perPageItems int) *DataPageOpsImpl[T]
type PageEntityRes ¶
type PageOpsImpl ¶
func (*PageOpsImpl[T, V, Z]) Converter ¶
func (paging *PageOpsImpl[T, V, Z]) Converter(f func(ctx context.Context, source *[]Z, target *[]T)) *PageOpsImpl[T, V, Z]
func (*PageOpsImpl[T, V, Z]) Ctx ¶
func (paging *PageOpsImpl[T, V, Z]) Ctx(ctx context.Context) *PageOpsImpl[T, V, Z]
func (*PageOpsImpl[T, V, Z]) CurrentPage ¶
func (paging *PageOpsImpl[T, V, Z]) CurrentPage(currentPage int) *PageOpsImpl[T, V, Z]
func (*PageOpsImpl[T, V, Z]) Fetch ¶
func (paging *PageOpsImpl[T, V, Z]) Fetch() (*PageEntityRes[T], error)
func (*PageOpsImpl[T, V, Z]) Limit ¶
func (paging *PageOpsImpl[T, V, Z]) Limit() int
func (*PageOpsImpl[T, V, Z]) Offset ¶
func (paging *PageOpsImpl[T, V, Z]) Offset() int
func (*PageOpsImpl[T, V, Z]) Params ¶
func (paging *PageOpsImpl[T, V, Z]) Params(params *V) *PageOpsImpl[T, V, Z]
func (*PageOpsImpl[T, V, Z]) PerPageItems ¶
func (paging *PageOpsImpl[T, V, Z]) PerPageItems(perPageItems int) *PageOpsImpl[T, V, Z]
func (*PageOpsImpl[T, V, Z]) Query ¶
func (paging *PageOpsImpl[T, V, Z]) Query(f func(ctx context.Context, offset int, limit int, params *V) (*[]Z, *int, error)) *PageOpsImpl[T, V, Z]
type SimplePageOpsImpl ¶
type SimplePageOpsImpl[T any] struct { // contains filtered or unexported fields }
func SimplePaging ¶
func SimplePaging[T any](currentPage int, perPageItems int) *SimplePageOpsImpl[T]
func (*SimplePageOpsImpl[T]) Fetch ¶
func (paging *SimplePageOpsImpl[T]) Fetch() *PageEntityRes[T]
func (*SimplePageOpsImpl[T]) Limit ¶
func (paging *SimplePageOpsImpl[T]) Limit() int
func (*SimplePageOpsImpl[T]) Offset ¶
func (paging *SimplePageOpsImpl[T]) Offset() int
func (*SimplePageOpsImpl[T]) PageData ¶
func (paging *SimplePageOpsImpl[T]) PageData(totalItems int, pageData *[]T) *SimplePageOpsImpl[T]
func (*SimplePageOpsImpl[T]) PageModels ¶ added in v0.0.4
func (paging *SimplePageOpsImpl[T]) PageModels(totalItems int, modelsPtr any) *SimplePageOpsImpl[T]
Click to show internal directories.
Click to hide internal directories.