Copyright | (c) Anton Gushcha 2016 |
---|---|
License | MIT |
Maintainer | ncrashed@gmail.com |
Stability | experimental |
Portability | Portable |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- type PageParam = QueryParam "page" Page
- type Page = Word
- type PageSizeParam = QueryParam "size" PageSize
- type PageSize = Word
- data PagedList i a = PagedList {
- pagedListItems :: ![WithId i a]
- pagedListPages :: !Word
API types
type PageParam = QueryParam "page" Page Source #
Query parameter that carries pagination page number
type PageSizeParam = QueryParam "size" PageSize Source #
Query parameter that carries pagination page size value
Helpers
Collection of a
with attached ids of type i
and additional
page info.
PagedList | |
|
Instances
(Show i, Show a) => Show (PagedList i a) Source # | |
Generic (PagedList i a) Source # | |
(ToJSON i, ToJSON a) => ToJSON (PagedList i a) Source # | |
Defined in Servant.API.Auth.Token.Pagination | |
(FromJSON i, FromJSON a) => FromJSON (PagedList i a) Source # | |
(Typeable i, Typeable a, ToSchema i, ToSchema a) => ToSchema (PagedList i a) Source # | |
Defined in Servant.API.Auth.Token.Pagination declareNamedSchema :: Proxy (PagedList i a) -> Declare (Definitions Schema) NamedSchema # | |
(ToSample i, ToSample a) => ToSample (PagedList i a) Source # | |
type Rep (PagedList i a) Source # | |
Defined in Servant.API.Auth.Token.Pagination type Rep (PagedList i a) = D1 (MetaData "PagedList" "Servant.API.Auth.Token.Pagination" "servant-auth-token-api-0.5.4.0-inplace" False) (C1 (MetaCons "PagedList" PrefixI True) (S1 (MetaSel (Just "pagedListItems") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [WithId i a]) :*: S1 (MetaSel (Just "pagedListPages") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Word))) |