servant-auth-token-api-0.5.3.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 # 
Instance details

Defined in Servant.API.Auth.Token.Pagination

Methods

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

show :: PagedList i a -> String #

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

Generic (PagedList i a) Source # 
Instance details

Defined in Servant.API.Auth.Token.Pagination

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 # 
Instance details

Defined in Servant.API.Auth.Token.Pagination

(FromJSON i, FromJSON a) => FromJSON (PagedList i a) Source # 
Instance details

Defined in Servant.API.Auth.Token.Pagination

(Typeable i, Typeable a, ToSchema i, ToSchema a) => ToSchema (PagedList i a) Source # 
Instance details

Defined in Servant.API.Auth.Token.Pagination

(ToSample i, ToSample a) => ToSample (PagedList i a) Source # 
Instance details

Defined in Servant.API.Auth.Token.Pagination

Methods

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

type Rep (PagedList i a) Source # 
Instance details

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.3.0-G7WAobpzAxoCnmh0eSO2Q9" 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)))

Orphan instances