servant-auth-token-api-0.5.1.0: Servant based API for token based authorisation

Copyright(c) Anton Gushcha 2016
LicenseMIT
Maintainerncrashed@gmail.com
Stabilityexperimental
PortabilityPortable
Safe HaskellNone
LanguageHaskell2010

Servant.API.Auth.Token.Pagination

Contents

Description

 

Synopsis

API types

type PageParam = QueryParam "page" Page Source #

Query parameter that carries pagination page number

type Page = Word Source #

A page number

type PageSizeParam = QueryParam "size" PageSize Source #

Query parameter that carries pagination page size value

type PageSize = Word Source #

Number of items on a page

Helpers

data PagedList i a Source #

Collection of a with attached ids of type i and additional page info.

Constructors

PagedList 

Fields

Instances

(Show i, Show a) => Show (PagedList i a) Source # 

Methods

showsPrec :: Int -> PagedList i a -> ShowS #

show :: PagedList i a -> String #

showList :: [PagedList i a] -> ShowS #

Generic (PagedList i a) Source # 

Associated Types

type Rep (PagedList i a) :: * -> * #

Methods

from :: PagedList i a -> Rep (PagedList i a) x #

to :: Rep (PagedList i a) x -> PagedList i a #

(ToJSON i, ToJSON a) => ToJSON (PagedList i a) Source # 
(FromJSON i, FromJSON a) => FromJSON (PagedList i a) Source # 
(Typeable * i, Typeable * a, ToSchema i, ToSchema a) => ToSchema (PagedList i a) Source # 
(ToSample i, ToSample a) => ToSample (PagedList i a) Source # 

Methods

toSamples :: Proxy * (PagedList i a) -> [(Text, PagedList i a)] #

type Rep (PagedList i a) Source # 
type Rep (PagedList i a) = D1 * (MetaData "PagedList" "Servant.API.Auth.Token.Pagination" "servant-auth-token-api-0.5.1.0-9tBaPux3ofkK1SHK977WDj" False) (C1 * (MetaCons "PagedList" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "pagedListItems") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * [WithId i a])) (S1 * (MetaSel (Just Symbol "pagedListPages") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 * Word))))

Orphan instances