Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 MongoAdapter ¶
type MongoAdapter struct {
// contains filtered or unexported fields
}
MongoAdapter mongo adapter to be passed to paginator constructor
func NewMongoAdapter ¶
func NewMongoAdapter(db *mongo.Collection) MongoAdapter
NewMongoAdapter Mongo adapter constructor which receive the Mongo db query.
func (MongoAdapter) Slice ¶
func (a MongoAdapter) 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