modulepackage
0.1.6
Repository: https://github.com/jacobbrewer1/pagefilter.git
Documentation: pkg.go.dev
# README
PageFilter
This library contains utilities for writing a filterable, pageable and sortable list endpoint
Notes
Documentation for the basic technique used can be found here.
# Packages
Package common provides primitives to interact with the openapi HTTP API.
# Functions
DetailsFromRequest retrieves the paginator details from the request.
GetPaginatorDetails loads paginator details from a request.
NewMockDB creates a new instance of MockDB.
NewMockFilter creates a new instance of MockFilter.
NewMockGrouper creates a new instance of MockGrouper.
NewMockJoiner creates a new instance of MockJoiner.
NewMockWherer creates a new instance of MockWherer.
NewMockWhereTyper creates a new instance of MockWhereTyper.
No description provided by the author
NewPaginator creates a new paginator.
# Constants
DefaultSortBy is the default sort by key.
Equal is the equal comparison operator.
GreaterThan is the greater than comparison operator.
LessThan is the less than comparison operator.
Like is the partial match operator.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
ErrNoDestination is returned when the destination is nil.
# Structs
MockDB is an autogenerated mock type for the DB type.
MockFilter is an autogenerated mock type for the Filter type.
MockGrouper is an autogenerated mock type for the Grouper type.
MockJoiner is an autogenerated mock type for the Joiner type.
MockWherer is an autogenerated mock type for the Wherer type.
MockWhereTyper is an autogenerated mock type for the WhereTyper type.
No description provided by the author
PaginatedResponse is a response that contains a list of items and the total number of items.
Paginator is the struct that provides the paging.
PaginatorDetails contains pagination details.
# Interfaces
DB is the common interface for database operations
This should work with database/sql.DB and database/sql.Tx.
No description provided by the author
Grouper represents something which can provide a group by to filter a sql query.
Joiner represents something which can provide joins for an SQL query.
Wherer is an interface that can be used to specify the WHERE clause to use.
WhereTyper is an interface that can be used to specify the type of WHERE clause to use.
# Type aliases
No description provided by the author