servant-auth-token-api-0.4.1.1: 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 i0, ToJSON a0) => ToJSON (PagedList i0 a0) Source # 

Methods

toJSON :: PagedList i0 a0 -> Value #

toEncoding :: PagedList i0 a0 -> Encoding #

toJSONList :: [PagedList i0 a0] -> Value #

toEncodingList :: [PagedList i0 a0] -> Encoding #

(FromJSON i0, FromJSON a0) => FromJSON (PagedList i0 a0) Source # 

Methods

parseJSON :: Value -> Parser (PagedList i0 a0) #

parseJSONList :: Value -> Parser [PagedList i0 a0] #

(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.4.1.1-LQU7z8fddd8JxGDSuPxEYe" 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