package
1.3.1
Repository: https://github.com/asif-mahmud/go-httputil.git
Documentation: pkg.go.dev

# Functions

CountTotalPages counts total number of pages from total item count and per page item count.
GetPaginationParams parses the request's search query and constructs PaginationParams instance.
GetSortingData parses sorting related parameters from url search query.
NewValue creates a pointer to a new zero value of the type of v.
SendData writes JSON marshalled data to the response in pre-defined structure.
SendError writes data with specified status code to the response with status set to false.
SendPage writes a pagination response in the pre-defined response structure.
ToJSON marshals any data into json string and ignores any error.

# Constants

DefaultPageSize sets the default page size.
ErrorMsg is common error message sent to the client if something went wrong unexpectedly while processing the request.
LimitKey is the search query key for PaginationParams.Limit.
MaxPageSize limits the maximum possible page size.
PageKey is the search query key for PaginationParams.Page.
SearchKey is the search query key for PaginationParams.Search.
SortByKey is the search query key for the PaginationParams.SortBy.
SortOrderKey is the search query key for the PaginationParams.SortOrder.

# Structs

Page defines the data structure send for pagination response's data field.
PaginationParams container for pagination parameters collected from url search queries.

# Type aliases

FilterParams is collection of query parameters found in the search queries of the incoming request.