Versions in this module Expand all Collapse all v3 v3.1.2 May 21, 2026 v3.1.1 May 21, 2026 v3.1.0 May 20, 2026 v3.0.2 May 19, 2026 v3.0.1 May 19, 2026 v3.0.0 May 17, 2026 Changes in this version + type CursorCodec interface + Decode func(cursor string) (map[string]string, error) + Encode func(values map[string]string, expiresAt time.Time) (string, error) + func NewHMACCursorCodec(secret []byte) CursorCodec + type CursorMeta struct + Count int + Cursor string + Limit int + NextCursor string + type CursorQuery struct + Cursor string + Limit int + Raw map[string][]string + Values map[string]string + func ParseCursorQueryChecked(r *http.Request, cfg CursorQueryConfig) (CursorQuery, error) + type CursorQueryConfig struct + Codec CursorCodec + CursorParam string + DefaultLimit int + LimitParam string + MaxLimit int + type CursorResponse struct + Data []T + Meta CursorMeta + func NewCursorResponse[T any](items []T, nextCursor string, query CursorQuery) CursorResponse[T] + type Filters map[string][]string + func DefaultFilterParserChecked(values url.Values, cfg ListQueryConfig) (Filters, fielderrors.FieldErrors) + type ListMeta struct + Count int + Filters map[string][]string + Limit int + Offset int + Search string + Sort []SortField + Total int + type ListQuery struct + Filters Filters + Limit int + Offset int + Raw url.Values + Search string + Sort []SortField + func ParseListQueryChecked(r *http.Request, cfg ListQueryConfig) (ListQuery, error) + func (q ListQuery) First(key string) string + func (q ListQuery) Has(key string) bool + func (q ListQuery) MissingRequired() []string + type ListQueryConfig struct + AllowedFilters []string + AllowedSorts []string + DefaultLimit int + DefaultSort []SortField + FilterParser func(values url.Values, cfg ListQueryConfig) (Filters, fielderrors.FieldErrors) + MaxLimit int + Required []string + SearchParam string + SortParam string + SortParser func(values url.Values, cfg ListQueryConfig) ([]SortField, fielderrors.FieldErrors) + type ListResponse struct + Data []T + Meta ListMeta + func NewListResponse[T any](items []T, total int, query ListQuery) ListResponse[T] + type SortField struct + Desc bool + Field string + func DefaultSortParserChecked(values url.Values, cfg ListQueryConfig) ([]SortField, fielderrors.FieldErrors) Other modules containing this package github.com/aatuh/api-toolkit github.com/aatuh/api-toolkit/v2