Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGORMAdapter ¶
NewGORMAdapter gorm adapter constructor which receive the gorm db query.
func NewSliceAdapter ¶
NewSliceAdapter slice adapter construct receive the slice source which needs to be paginated.
Types ¶
type GORMAdapter ¶
type GORMAdapter struct {
// contains filtered or unexported fields
}
GORMAdapter gorm adapter to be passed to paginator constructor
func (*GORMAdapter) Nums ¶
func (a *GORMAdapter) Nums() (int64, error)
Nums returns the number of records
func (*GORMAdapter) Slice ¶
func (a *GORMAdapter) Slice(offset, length int, data interface{}) error
Slice stores into data argument a slice of the results. data must be a pointer to a slice of models.
type SliceAdapter ¶
type SliceAdapter struct {
// contains filtered or unexported fields
}
SliceAdapter slice adapter to be passed to paginator constructor to paginate a slice of elements.
func (*SliceAdapter) Nums ¶
func (a *SliceAdapter) Nums() (int64, error)
Nums returns the number of elements
func (*SliceAdapter) Slice ¶
func (a *SliceAdapter) Slice(offset, length int, dest interface{}) error
Slice stores into dest argument a slice of the results. dest argument must be a pointer to a slice
Click to show internal directories.
Click to hide internal directories.