Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GORM2Adapter ¶
type GORM2Adapter struct {
// contains filtered or unexported fields
}
GORM2Adapter gorm adapter to be passed to paginator constructor
func NewGORM2Adapter ¶
func NewGORM2Adapter(db *gorm.DB) GORM2Adapter
NewGORM2Adapter gorm adapter constructor which receive the gorm db query.
func (GORM2Adapter) Slice ¶
func (a GORM2Adapter) 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 GORMAdapter ¶
type GORMAdapter struct {
// contains filtered or unexported fields
}
GORMAdapter gorm adapter to be passed to paginator constructor
func NewGORMAdapter ¶
func NewGORMAdapter(db *gorm.DB) GORMAdapter
NewGORMAdapter gorm adapter constructor which receive the gorm db query.
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 NewSliceAdapter ¶
func NewSliceAdapter(source interface{}) SliceAdapter
NewSliceAdapter slice adapter construct receive the slice source which needs to be paginated.
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