Safe Haskell | None |
---|---|
Language | Haskell2010 |
Servant.Foreign
Description
Generalizes all the data needed to make code generation work with arbitrary programming languages.
See documentation of HasForeignType
for a simple example. listFromAPI
returns a list of all your endpoints and their foreign types, given a mapping from Haskell types to foreign types (conventionally called ftypes
below).
Synopsis
- listFromAPI :: forall {k} (lang :: k) ftype api. (HasForeign lang ftype api, GenerateList ftype (Foreign ftype api)) => Proxy lang -> Proxy ftype -> Proxy api -> [Req ftype]
- data Req ftype = Req {
- _reqUrl :: Url ftype
- _reqMethod :: Method
- _reqHeaders :: [HeaderArg ftype]
- _reqBody :: Maybe ftype
- _reqReturnType :: Maybe ftype
- _reqFuncName :: FunctionName
- _reqBodyContentType :: ReqBodyContentType
- defReq :: Req ftype
- class HasForeignType (lang :: k) ftype (a :: k1) where
- typeFor :: Proxy lang -> Proxy ftype -> Proxy a -> ftype
- class GenerateList ftype reqs where
- generateList :: reqs -> [Req ftype]
- class HasForeign (lang :: k) ftype api where
- type Foreign ftype api
- foreignFor :: Proxy lang -> Proxy ftype -> Proxy api -> Req ftype -> Foreign ftype api
- data NoTypes
- data Url ftype = Url {}
- type Path ftype = [Segment ftype]
- newtype Segment ftype = Segment {
- unSegment :: SegmentType ftype
- data SegmentType ftype
- = Static PathSegment
- | Cap (Arg ftype)
- isCapture :: Segment ftype -> Bool
- captureArg :: Segment ftype -> Arg ftype
- data QueryArg ftype = QueryArg {
- _queryArgName :: Arg ftype
- _queryArgType :: ArgType
- data ArgType
- data HeaderArg ftype
- = HeaderArg {
- _headerArg :: Arg ftype
- | ReplaceHeaderArg {
- _headerArg :: Arg ftype
- _headerPattern :: Text
- = HeaderArg {
- data Arg ftype = Arg {
- _argName :: PathSegment
- _argType :: ftype
- newtype FunctionName = FunctionName {
- unFunctionName :: [Text]
- data ReqBodyContentType
- newtype PathSegment = PathSegment {
- unPathSegment :: Text
- argName :: forall ftype f. Functor f => (PathSegment -> f PathSegment) -> Arg ftype -> f (Arg ftype)
- argType :: forall ftype1 ftype2 f. Functor f => (ftype1 -> f ftype2) -> Arg ftype1 -> f (Arg ftype2)
- argPath :: forall ftype f. (Contravariant f, Functor f) => (Text -> f Text) -> Arg ftype -> f (Arg ftype)
- reqUrl :: forall ftype f. Functor f => (Url ftype -> f (Url ftype)) -> Req ftype -> f (Req ftype)
- reqMethod :: forall ftype f. Functor f => (Method -> f Method) -> Req ftype -> f (Req ftype)
- reqHeaders :: forall ftype f. Functor f => ([HeaderArg ftype] -> f [HeaderArg ftype]) -> Req ftype -> f (Req ftype)
- reqBody :: forall ftype f. Functor f => (Maybe ftype -> f (Maybe ftype)) -> Req ftype -> f (Req ftype)
- reqBodyContentType :: forall ftype f. Functor f => (ReqBodyContentType -> f ReqBodyContentType) -> Req ftype -> f (Req ftype)
- reqReturnType :: forall ftype f. Functor f => (Maybe ftype -> f (Maybe ftype)) -> Req ftype -> f (Req ftype)
- reqFuncName :: forall ftype f. Functor f => (FunctionName -> f FunctionName) -> Req ftype -> f (Req ftype)
- path :: forall ftype f. Functor f => (Path ftype -> f (Path ftype)) -> Url ftype -> f (Url ftype)
- queryStr :: forall ftype f. Functor f => ([QueryArg ftype] -> f [QueryArg ftype]) -> Url ftype -> f (Url ftype)
- queryArgName :: forall ftype1 ftype2 f. Functor f => (Arg ftype1 -> f (Arg ftype2)) -> QueryArg ftype1 -> f (QueryArg ftype2)
- queryArgType :: forall ftype f. Functor f => (ArgType -> f ArgType) -> QueryArg ftype -> f (QueryArg ftype)
- headerArg :: forall ftype1 ftype2 f. Functor f => (Arg ftype1 -> f (Arg ftype2)) -> HeaderArg ftype1 -> f (HeaderArg ftype2)
- _PathSegment :: Iso' PathSegment Text
- _HeaderArg :: forall ftype p f. (Choice p, Applicative f) => p (Arg ftype) (f (Arg ftype)) -> p (HeaderArg ftype) (f (HeaderArg ftype))
- _ReplaceHeaderArg :: forall ftype p f. (Choice p, Applicative f) => p (Arg ftype, Text) (f (Arg ftype, Text)) -> p (HeaderArg ftype) (f (HeaderArg ftype))
- _Static :: forall ftype p f. (Choice p, Applicative f) => p PathSegment (f PathSegment) -> p (SegmentType ftype) (f (SegmentType ftype))
- _Cap :: forall ftype1 ftype2 p f. (Choice p, Applicative f) => p (Arg ftype1) (f (Arg ftype2)) -> p (SegmentType ftype1) (f (SegmentType ftype2))
- _Normal :: Prism' ArgType ()
- _Flag :: Prism' ArgType ()
- _List :: Prism' ArgType ()
- data NoContent = NoContent
- data a :<|> b = a :<|> b
- data EmptyAPI = EmptyAPI
- data Capture' (mods :: [Type]) (sym :: Symbol) a
- data (path :: k) :> a
- data CaptureAll (sym :: Symbol) a
- data JSON
- class ReflectMethod (a :: k) where
- reflectMethod :: Proxy a -> Method
- data Verb (method :: k1) (statusCode :: Nat) (contentTypes :: [Type]) a
- data NoContentVerb (method :: k1)
- data Stream (method :: k1) (status :: Nat) framing contentType a
- data Header' (mods :: [Type]) (sym :: Symbol) a
- data QueryParam' (mods :: [Type]) (sym :: Symbol) a
- data QueryParams (sym :: Symbol) a
- data QueryFlag (sym :: Symbol)
- data Fragment a
- data Raw
- data ReqBody' (mods :: [Type]) (contentTypes :: [Type]) a
- data StreamBody' (mods :: [Type]) framing contentType a
- data RemoteHost
- data IsSecure
- type Vault = Vault RealWorld
- data WithNamedContext (name :: Symbol) (subContext :: [Type]) (subApi :: k)
- data WithResource (res :: k)
- data HttpVersion = HttpVersion {}
- data Summary (sym :: Symbol)
- data Description (sym :: Symbol)
- type ToServantApi (routes :: Type -> Type) = ToServant routes AsApi
- data NamedRoutes (api :: Type -> Type)
- data Strict
- type Header = Header' '[Optional, Strict]
- data ResponseHeader (sym :: Symbol) a
- = Header a
- | MissingHeader
- | UndecodableHeader ByteString
- data StdMethod
- data BasicAuth (realm :: Symbol) userData
- data BasicAuthData = BasicAuthData {
- basicAuthUsername :: !ByteString
- basicAuthPassword :: !ByteString
- type Capture = Capture' ('[] :: [Type])
- class Accept (ctype :: k) where
- contentType :: Proxy ctype -> MediaType
- contentTypes :: Proxy ctype -> NonEmpty MediaType
- data FormUrlEncoded
- class Accept ctype => MimeRender (ctype :: k) a where
- mimeRender :: Proxy ctype -> a -> ByteString
- class Accept ctype => MimeUnrender (ctype :: k) a where
- mimeUnrender :: Proxy ctype -> ByteString -> Either String a
- mimeUnrenderWithType :: Proxy ctype -> MediaType -> ByteString -> Either String a
- data OctetStream
- data PlainText
- data AuthProtect (tag :: k)
- class GenericMode (mode :: k) where
- type (mode :: k) :- api
- type family (mode :: k) :- api
- data AsApi
- class GServantProduct (f :: k -> Type)
- type GenericServant (routes :: k -> Type) (mode :: k) = (GenericMode mode, Generic (routes mode), GServantProduct (Rep (routes mode)))
- type ToServant (routes :: k -> Type) (mode :: k) = GToServant (Rep (routes mode))
- fromServant :: forall {k} routes (mode :: k). GenericServant routes mode => ToServant routes mode -> routes mode
- genericApi :: forall (routes :: Type -> Type). GenericServant routes AsApi => Proxy routes -> Proxy (ToServantApi routes)
- toServant :: forall {k} routes (mode :: k). GenericServant routes mode => routes mode -> ToServant routes mode
- data Lenient
- data Optional
- data Required
- type QueryParam = QueryParam' '[Optional, Strict]
- data DeepQuery (sym :: Symbol) a
- data QueryString
- data RawM
- type ReqBody = ReqBody' '[Required, Strict]
- class AddHeader (mods :: [Type]) (h :: Symbol) v orig new | mods h v orig -> new, new -> mods, new -> h, new -> v, new -> orig
- class BuildHeadersTo (hs :: [Type]) where
- buildHeadersTo :: [Header] -> HList hs
- class GetHeaders ls where
- getHeaders :: ls -> [Header]
- data HList (a :: [Type]) where
- class HasResponseHeader (h :: Symbol) a (headers :: [Type])
- data Headers (ls :: [Type]) a = Headers {
- getResponse :: a
- getHeadersHList :: HList ls
- addHeader :: forall (h :: Symbol) v orig new. AddHeader '[Optional, Strict] h v orig new => v -> orig -> new
- addHeader' :: forall (mods :: [Type]) (h :: Symbol) v orig new. AddHeader mods h v orig new => v -> orig -> new
- lookupResponseHeader :: forall (h :: Symbol) a (headers :: [Type]) r. HasResponseHeader h a headers => Headers headers r -> ResponseHeader h a
- noHeader :: forall (h :: Symbol) v orig new. AddHeader '[Optional, Strict] h v orig new => orig -> new
- noHeader' :: forall (mods :: [Type]) (h :: Symbol) v orig new. AddHeader mods h v orig new => orig -> new
- class FramingRender (strategy :: k) where
- framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy strategy -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString
- class FramingUnrender (strategy :: k) where
- framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy strategy -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a
- class FromSourceIO chunk a | a -> chunk where
- fromSourceIO :: SourceIO chunk -> IO a
- data NetstringFraming
- data NewlineFraming
- data NoFraming
- type SourceIO = SourceT IO
- type StreamBody = StreamBody' ('[] :: [Type])
- type StreamGet = Stream 'GET 200
- type StreamPost = Stream 'POST 200
- class ToSourceIO chunk a | a -> chunk where
- toSourceIO :: a -> SourceIO chunk
- type family IsElem endpoint api where ...
- type family IsElem' a s
- class KnownStatus (StatusOf a) => HasStatus a where
- type StatusOf a :: Nat
- type family StatusOf a :: Nat
- type family Statuses (as :: [Type]) :: [Nat]
- type family Statuses (as :: [Type]) :: [Nat]
- data UVerb (method :: StdMethod) (contentTypes :: [Type]) (as :: [Type])
- newtype WithStatus (k :: Nat) a = WithStatus a
- statusOf :: HasStatus a => proxy a -> Status
- type IsMember (a :: u) (as :: [u]) = (Unique as, CheckElemIsMember a as, UElem a as)
- type Union = NS I
- type family Unique (xs :: [k]) where ...
- inject :: UElem x xs => f x -> NS f xs
- type Delete = Verb 'DELETE 200
- type DeleteAccepted = Verb 'DELETE 202
- type DeleteNoContent = NoContentVerb 'DELETE
- type DeleteNonAuthoritative = Verb 'DELETE 203
- type Get = Verb 'GET 200
- type GetAccepted = Verb 'GET 202
- type GetNoContent = NoContentVerb 'GET
- type GetNonAuthoritative = Verb 'GET 203
- type GetPartialContent = Verb 'GET 206
- type GetResetContent = Verb 'GET 205
- type Patch = Verb 'PATCH 200
- type PatchAccepted = Verb 'PATCH 202
- type PatchNoContent = NoContentVerb 'PATCH
- type PatchNonAuthoritative = Verb 'PATCH 203
- type Post = Verb 'POST 200
- type PostAccepted = Verb 'POST 202
- type PostCreated = Verb 'POST 201
- type PostNoContent = NoContentVerb 'POST
- type PostNonAuthoritative = Verb 'POST 203
- type PostResetContent = Verb 'POST 205
- type Put = Verb 'PUT 200
- type PutAccepted = Verb 'PUT 202
- type PutCreated = Verb 'PUT 201
- type PutNoContent = NoContentVerb 'PUT
- type PutNonAuthoritative = Verb 'PUT 203
- class HasLink (endpoint :: k) where
- data Link
- type family MkLink (endpoint :: k) a
- safeLink :: (IsElem endpoint api, HasLink endpoint) => Proxy api -> Proxy endpoint -> MkLink endpoint Link
- type family If (cond :: Bool) (tru :: k) (fls :: k) :: k where ...
- class FromHttpApiData a where
- parseUrlPiece :: Text -> Either Text a
- parseHeader :: ByteString -> Either Text a
- parseQueryParam :: Text -> Either Text a
- class ToHttpApiData a where
- toUrlPiece :: a -> Text
- toEncodedUrlPiece :: a -> Builder
- toHeader :: a -> ByteString
- toQueryParam :: a -> Text
- toEncodedQueryParam :: a -> Builder
- data URI = URI {
- uriScheme :: String
- uriAuthority :: Maybe URIAuth
- uriPath :: String
- uriQuery :: String
- uriFragment :: String
- data SBool (b :: Bool) where
- class SBoolI (b :: Bool) where
- module Servant.Foreign.Inflections
Main API
listFromAPI :: forall {k} (lang :: k) ftype api. (HasForeign lang ftype api, GenerateList ftype (Foreign ftype api)) => Proxy lang -> Proxy ftype -> Proxy api -> [Req ftype] Source #
Generate the necessary data for codegen as a list, each Req
describing one endpoint from your API type.
Full description of an endpoint in your API, generated by listFromAPI
. It should give you all the information needed to generate foreign language bindings.
Every field containing ftype
will use the foreign type mapping specified via HasForeignType
(see its docstring on how to set that up).
See https://docs.servant.dev/en/stable/tutorial/ApiType.html for accessible documentation of the possible content of an endpoint.
Constructors
Req | |
Fields
|
Instances
GenerateList ftype (Req ftype) Source # | |
Defined in Servant.Foreign.Internal Methods generateList :: Req ftype -> [Req ftype] Source # | |
Data ftype => Data (Req ftype) Source # | |
Defined in Servant.Foreign.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Req ftype -> c (Req ftype) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Req ftype) toConstr :: Req ftype -> Constr dataTypeOf :: Req ftype -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Req ftype)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Req ftype)) gmapT :: (forall b. Data b => b -> b) -> Req ftype -> Req ftype gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Req ftype -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Req ftype -> r gmapQ :: (forall d. Data d => d -> u) -> Req ftype -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Req ftype -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Req ftype -> m (Req ftype) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Req ftype -> m (Req ftype) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Req ftype -> m (Req ftype) | |
Show ftype => Show (Req ftype) Source # | |
Eq ftype => Eq (Req ftype) Source # | |
class HasForeignType (lang :: k) ftype (a :: k1) where Source #
HasForeignType
maps Haskell types with types in the target
language of your backend. For example, let's say you're
implementing a backend to some language X, and you want
a Text representation of each input/output type mentioned in the API:
-- First you need to create a dummy type to parametrize your -- instances. data LangX -- Otherwise you define instances for the types you need instance HasForeignType LangX Text Int where typeFor _ _ _ = "intX" -- Or for example in case of lists instance HasForeignType LangX Text a => HasForeignType LangX Text [a] where typeFor lang ftype _ = "listX of " <> typeFor lang ftype (Proxy :: Proxy a)
Finally to generate list of information about all the endpoints for an API you create a function of a form:
getEndpoints :: (HasForeign LangX Text api, GenerateList Text (Foreign Text api)) => Proxy api -> [Req Text] getEndpoints api = listFromAPI (Proxy :: Proxy LangX) (Proxy :: Proxy Text) api
-- If language __X__ is dynamically typed then you can use -- a predefined NoTypes parameter with the NoContent output type:
getEndpoints :: (HasForeign NoTypes NoContent api, GenerateList Text (Foreign NoContent api)) => Proxy api -> [Req NoContent] getEndpoints api = listFromAPI (Proxy :: Proxy NoTypes) (Proxy :: Proxy NoContent) api
class GenerateList ftype reqs where Source #
Utility class used by listFromAPI
which computes
the data needed to generate a function for each endpoint
and hands it all back in a list.
Methods
generateList :: reqs -> [Req ftype] Source #
Instances
GenerateList ftype EmptyForeignAPI Source # | |
Defined in Servant.Foreign.Internal Methods generateList :: EmptyForeignAPI -> [Req ftype] Source # | |
GenerateList ftype (Req ftype) Source # | |
Defined in Servant.Foreign.Internal Methods generateList :: Req ftype -> [Req ftype] Source # | |
(GenerateList ftype start, GenerateList ftype rest) => GenerateList ftype (start :<|> rest) Source # | |
Defined in Servant.Foreign.Internal Methods generateList :: (start :<|> rest) -> [Req ftype] Source # |
class HasForeign (lang :: k) ftype api where Source #
Implementation of the Servant framework types.
Relevant instances: Everything containing HasForeignType
.
Methods
foreignFor :: Proxy lang -> Proxy ftype -> Proxy api -> Req ftype -> Foreign ftype api Source #
Instances
HasForeign (lang :: k) ftype EmptyAPI Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasForeign (lang :: k) ftype Raw Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasForeign lang ftype (ToServantApi r) => HasForeign (lang :: k) ftype (NamedRoutes r) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (NamedRoutes r) -> Req ftype -> Foreign ftype (NamedRoutes r) Source # | |||||
(HasForeign lang ftype a, HasForeign lang ftype b) => HasForeign (lang :: k) ftype (a :<|> b) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
(HasForeignType lang ftype NoContent, ReflectMethod method) => HasForeign (lang :: k) ftype (NoContentVerb method) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (NoContentVerb method) -> Req ftype -> Foreign ftype (NoContentVerb method) Source # | |||||
(KnownSymbol path, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (path :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (HttpVersion :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (HttpVersion :> api) -> Req ftype -> Foreign ftype (HttpVersion :> api) Source # | |||||
(KnownSymbol sym, HasForeignType lang ftype t, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Capture' mods sym t :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(KnownSymbol sym, HasForeignType lang ftype [t], HasForeign lang ftype sublayout) => HasForeign (lang :: k) ftype (CaptureAll sym t :> sublayout) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (CaptureAll sym t :> sublayout) -> Req ftype -> Foreign ftype (CaptureAll sym t :> sublayout) Source # | |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (Description desc :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Description desc :> api) -> Req ftype -> Foreign ftype (Description desc :> api) Source # | |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (Summary desc :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(HasForeignType lang ftype (Maybe a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Fragment a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(KnownSymbol sym, HasForeignType lang ftype (RequiredArgument mods a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Header' mods sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (IsSecure :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(KnownSymbol sym, HasForeignType lang ftype Bool, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryFlag sym :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(KnownSymbol sym, HasForeignType lang ftype (RequiredArgument mods a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryParam' mods sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryParam' mods sym a :> api) -> Req ftype -> Foreign ftype (QueryParam' mods sym a :> api) Source # | |||||
(KnownSymbol sym, HasForeignType lang ftype [a], HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryParams sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryParams sym a :> api) -> Req ftype -> Foreign ftype (QueryParams sym a :> api) Source # | |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (RemoteHost :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (RemoteHost :> api) -> Req ftype -> Foreign ftype (RemoteHost :> api) Source # | |||||
(Elem JSON list, HasForeignType lang ftype a, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (ReqBody' mods list a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (StreamBody' mods framing ctype a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (StreamBody' mods framing ctype a :> api) -> Req ftype -> Foreign ftype (StreamBody' mods framing ctype a :> api) Source # | |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (Vault :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasForeign lang ftype api => HasForeign (lang :: k1) ftype (WithResource res :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (WithResource res :> api) -> Req ftype -> Foreign ftype (WithResource res :> api) Source # | |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (WithNamedContext name context api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (WithNamedContext name context api) -> Req ftype -> Foreign ftype (WithNamedContext name context api) Source # | |||||
(Elem JSON list, HasForeignType lang ftype a, ReflectMethod method) => HasForeign (lang :: k) ftype (Verb method status list a) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(ct ~ JSON, HasForeignType lang ftype a, ReflectMethod method) => HasForeign (lang :: k) ftype (Stream method status framing ct a) Source # | TODO: doesn't taking framing into account. | ||||
Defined in Servant.Foreign.Internal Associated Types
|
The language definition without any foreign types. It can be used for dynamic languages which do not do type annotations.
Subtypes of Req
Full endpoint url, with all captures and parameters
Constructors
Url | |
Instances
Data ftype => Data (Url ftype) Source # | |
Defined in Servant.Foreign.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Url ftype -> c (Url ftype) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Url ftype) toConstr :: Url ftype -> Constr dataTypeOf :: Url ftype -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Url ftype)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Url ftype)) gmapT :: (forall b. Data b => b -> b) -> Url ftype -> Url ftype gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Url ftype -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Url ftype -> r gmapQ :: (forall d. Data d => d -> u) -> Url ftype -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Url ftype -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Url ftype -> m (Url ftype) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Url ftype -> m (Url ftype) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Url ftype -> m (Url ftype) | |
Show ftype => Show (Url ftype) Source # | |
Eq ftype => Eq (Url ftype) Source # | |
newtype Segment ftype Source #
A part of the Url’s path.
Constructors
Segment | |
Fields
|
Instances
Data ftype => Data (Segment ftype) Source # | |
Defined in Servant.Foreign.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Segment ftype -> c (Segment ftype) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Segment ftype) toConstr :: Segment ftype -> Constr dataTypeOf :: Segment ftype -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Segment ftype)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Segment ftype)) gmapT :: (forall b. Data b => b -> b) -> Segment ftype -> Segment ftype gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Segment ftype -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Segment ftype -> r gmapQ :: (forall d. Data d => d -> u) -> Segment ftype -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Segment ftype -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Segment ftype -> m (Segment ftype) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Segment ftype -> m (Segment ftype) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Segment ftype -> m (Segment ftype) | |
Show ftype => Show (Segment ftype) Source # | |
Eq ftype => Eq (Segment ftype) Source # | |
data SegmentType ftype Source #
Constructors
Static PathSegment | Static path segment. "foo/bar/baz" contains the static segments |
Cap (Arg ftype) | A capture. "user/{userid}/name" would capture the arg |
Instances
Data ftype => Data (SegmentType ftype) Source # | |
Defined in Servant.Foreign.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SegmentType ftype -> c (SegmentType ftype) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (SegmentType ftype) toConstr :: SegmentType ftype -> Constr dataTypeOf :: SegmentType ftype -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (SegmentType ftype)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (SegmentType ftype)) gmapT :: (forall b. Data b => b -> b) -> SegmentType ftype -> SegmentType ftype gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SegmentType ftype -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SegmentType ftype -> r gmapQ :: (forall d. Data d => d -> u) -> SegmentType ftype -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> SegmentType ftype -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> SegmentType ftype -> m (SegmentType ftype) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SegmentType ftype -> m (SegmentType ftype) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SegmentType ftype -> m (SegmentType ftype) | |
Show ftype => Show (SegmentType ftype) Source # | |
Defined in Servant.Foreign.Internal Methods showsPrec :: Int -> SegmentType ftype -> ShowS show :: SegmentType ftype -> String showList :: [SegmentType ftype] -> ShowS | |
Eq ftype => Eq (SegmentType ftype) Source # | |
Defined in Servant.Foreign.Internal Methods (==) :: SegmentType ftype -> SegmentType ftype -> Bool (/=) :: SegmentType ftype -> SegmentType ftype -> Bool |
captureArg :: Segment ftype -> Arg ftype Source #
Crashing Arg extraction from segment, TODO: remove
Url Query argument.
Urls can contain query arguments, which is a list of key-value pairs. In a typical url, query arguments look like this:
?foo=bar&alist[]=el1&alist[]=el2&aflag
Each pair can be
?foo=bar
: a plain key-val pair, either optional or required (QueryParam
)?aflag
: a flag (no value, implicitly Bool with defaultfalse
if it’s missing) (QueryFlag
)?alist[]=el1&alist[]=el2
: list of values (QueryParams
)
_queryArgType
will be set accordingly.
For the plain key-val pairs (QueryParam
), _queryArgName
’s ftype
will be wrapped in a Maybe
if the argument is optional.
Constructors
QueryArg | |
Fields
|
Instances
Data ftype => Data (QueryArg ftype) Source # | |
Defined in Servant.Foreign.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> QueryArg ftype -> c (QueryArg ftype) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (QueryArg ftype) toConstr :: QueryArg ftype -> Constr dataTypeOf :: QueryArg ftype -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (QueryArg ftype)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (QueryArg ftype)) gmapT :: (forall b. Data b => b -> b) -> QueryArg ftype -> QueryArg ftype gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> QueryArg ftype -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> QueryArg ftype -> r gmapQ :: (forall d. Data d => d -> u) -> QueryArg ftype -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> QueryArg ftype -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> QueryArg ftype -> m (QueryArg ftype) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> QueryArg ftype -> m (QueryArg ftype) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> QueryArg ftype -> m (QueryArg ftype) | |
Show ftype => Show (QueryArg ftype) Source # | |
Eq ftype => Eq (QueryArg ftype) Source # | |
Type of a QueryArg
.
Instances
Data ArgType Source # | |
Defined in Servant.Foreign.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ArgType -> c ArgType gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ArgType dataTypeOf :: ArgType -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ArgType) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ArgType) gmapT :: (forall b. Data b => b -> b) -> ArgType -> ArgType gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ArgType -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ArgType -> r gmapQ :: (forall d. Data d => d -> u) -> ArgType -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> ArgType -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> ArgType -> m ArgType gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgType -> m ArgType gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ArgType -> m ArgType | |
Show ArgType Source # | |
Eq ArgType Source # | |
Constructors
HeaderArg | The name of the header and the foreign type of its value. |
Fields
| |
ReplaceHeaderArg | Unused, will never be set. TODO: remove |
Fields
|
Instances
Data ftype => Data (HeaderArg ftype) Source # | |
Defined in Servant.Foreign.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HeaderArg ftype -> c (HeaderArg ftype) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (HeaderArg ftype) toConstr :: HeaderArg ftype -> Constr dataTypeOf :: HeaderArg ftype -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (HeaderArg ftype)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (HeaderArg ftype)) gmapT :: (forall b. Data b => b -> b) -> HeaderArg ftype -> HeaderArg ftype gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HeaderArg ftype -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HeaderArg ftype -> r gmapQ :: (forall d. Data d => d -> u) -> HeaderArg ftype -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> HeaderArg ftype -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> HeaderArg ftype -> m (HeaderArg ftype) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HeaderArg ftype -> m (HeaderArg ftype) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HeaderArg ftype -> m (HeaderArg ftype) | |
Show ftype => Show (HeaderArg ftype) Source # | |
Eq ftype => Eq (HeaderArg ftype) Source # | |
Maps a name to the foreign type that belongs to the annotated value.
Used for header args, query args, and capture args.
Constructors
Arg | |
Fields
|
Instances
Data ftype => Data (Arg ftype) Source # | |
Defined in Servant.Foreign.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Arg ftype -> c (Arg ftype) gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Arg ftype) toConstr :: Arg ftype -> Constr dataTypeOf :: Arg ftype -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Arg ftype)) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Arg ftype)) gmapT :: (forall b. Data b => b -> b) -> Arg ftype -> Arg ftype gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Arg ftype -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Arg ftype -> r gmapQ :: (forall d. Data d => d -> u) -> Arg ftype -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> Arg ftype -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> Arg ftype -> m (Arg ftype) gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Arg ftype -> m (Arg ftype) gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Arg ftype -> m (Arg ftype) | |
Show ftype => Show (Arg ftype) Source # | |
Eq ftype => Eq (Arg ftype) Source # | |
newtype FunctionName Source #
Canonical name of the endpoint, can be used to generate a function name.
You can use the functions in Servant.Foreign.Inflections, like camelCase
to transform to Text
.
Constructors
FunctionName | |
Fields
|
Instances
Data FunctionName Source # | |
Defined in Servant.Foreign.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FunctionName -> c FunctionName gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FunctionName toConstr :: FunctionName -> Constr dataTypeOf :: FunctionName -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FunctionName) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FunctionName) gmapT :: (forall b. Data b => b -> b) -> FunctionName -> FunctionName gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FunctionName -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FunctionName -> r gmapQ :: (forall d. Data d => d -> u) -> FunctionName -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> FunctionName -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> FunctionName -> m FunctionName gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FunctionName -> m FunctionName gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FunctionName -> m FunctionName | |
Monoid FunctionName Source # | |
Defined in Servant.Foreign.Internal Methods mappend :: FunctionName -> FunctionName -> FunctionName mconcat :: [FunctionName] -> FunctionName | |
Semigroup FunctionName Source # | |
Defined in Servant.Foreign.Internal Methods (<>) :: FunctionName -> FunctionName -> FunctionName sconcat :: NonEmpty FunctionName -> FunctionName stimes :: Integral b => b -> FunctionName -> FunctionName | |
Show FunctionName Source # | |
Defined in Servant.Foreign.Internal Methods showsPrec :: Int -> FunctionName -> ShowS show :: FunctionName -> String showList :: [FunctionName] -> ShowS | |
Eq FunctionName Source # | |
Defined in Servant.Foreign.Internal |
data ReqBodyContentType Source #
See documentation of _reqBodyContentType
Constructors
ReqBodyJSON | |
ReqBodyMultipart |
Instances
Data ReqBodyContentType Source # | |
Defined in Servant.Foreign.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ReqBodyContentType -> c ReqBodyContentType gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ReqBodyContentType toConstr :: ReqBodyContentType -> Constr dataTypeOf :: ReqBodyContentType -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ReqBodyContentType) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ReqBodyContentType) gmapT :: (forall b. Data b => b -> b) -> ReqBodyContentType -> ReqBodyContentType gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ReqBodyContentType -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ReqBodyContentType -> r gmapQ :: (forall d. Data d => d -> u) -> ReqBodyContentType -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> ReqBodyContentType -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> ReqBodyContentType -> m ReqBodyContentType gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ReqBodyContentType -> m ReqBodyContentType gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ReqBodyContentType -> m ReqBodyContentType | |
Read ReqBodyContentType Source # | |
Defined in Servant.Foreign.Internal Methods readsPrec :: Int -> ReadS ReqBodyContentType readList :: ReadS [ReqBodyContentType] readPrec :: ReadPrec ReqBodyContentType readListPrec :: ReadPrec [ReqBodyContentType] | |
Show ReqBodyContentType Source # | |
Defined in Servant.Foreign.Internal Methods showsPrec :: Int -> ReqBodyContentType -> ShowS show :: ReqBodyContentType -> String showList :: [ReqBodyContentType] -> ShowS | |
Eq ReqBodyContentType Source # | |
Defined in Servant.Foreign.Internal Methods (==) :: ReqBodyContentType -> ReqBodyContentType -> Bool (/=) :: ReqBodyContentType -> ReqBodyContentType -> Bool |
newtype PathSegment Source #
See documentation of Arg
Constructors
PathSegment | |
Fields
|
Instances
Data PathSegment Source # | |
Defined in Servant.Foreign.Internal Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PathSegment -> c PathSegment gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PathSegment toConstr :: PathSegment -> Constr dataTypeOf :: PathSegment -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PathSegment) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PathSegment) gmapT :: (forall b. Data b => b -> b) -> PathSegment -> PathSegment gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PathSegment -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PathSegment -> r gmapQ :: (forall d. Data d => d -> u) -> PathSegment -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> PathSegment -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> PathSegment -> m PathSegment gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PathSegment -> m PathSegment gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PathSegment -> m PathSegment | |
IsString PathSegment Source # | |
Defined in Servant.Foreign.Internal Methods fromString :: String -> PathSegment | |
Monoid PathSegment Source # | |
Defined in Servant.Foreign.Internal | |
Semigroup PathSegment Source # | |
Defined in Servant.Foreign.Internal Methods (<>) :: PathSegment -> PathSegment -> PathSegment sconcat :: NonEmpty PathSegment -> PathSegment stimes :: Integral b => b -> PathSegment -> PathSegment | |
Show PathSegment Source # | |
Defined in Servant.Foreign.Internal Methods showsPrec :: Int -> PathSegment -> ShowS show :: PathSegment -> String showList :: [PathSegment] -> ShowS | |
Eq PathSegment Source # | |
Defined in Servant.Foreign.Internal |
Lenses
argName :: forall ftype f. Functor f => (PathSegment -> f PathSegment) -> Arg ftype -> f (Arg ftype) Source #
argType :: forall ftype1 ftype2 f. Functor f => (ftype1 -> f ftype2) -> Arg ftype1 -> f (Arg ftype2) Source #
argPath :: forall ftype f. (Contravariant f, Functor f) => (Text -> f Text) -> Arg ftype -> f (Arg ftype) Source #
reqUrl :: forall ftype f. Functor f => (Url ftype -> f (Url ftype)) -> Req ftype -> f (Req ftype) Source #
reqMethod :: forall ftype f. Functor f => (Method -> f Method) -> Req ftype -> f (Req ftype) Source #
reqHeaders :: forall ftype f. Functor f => ([HeaderArg ftype] -> f [HeaderArg ftype]) -> Req ftype -> f (Req ftype) Source #
reqBody :: forall ftype f. Functor f => (Maybe ftype -> f (Maybe ftype)) -> Req ftype -> f (Req ftype) Source #
reqBodyContentType :: forall ftype f. Functor f => (ReqBodyContentType -> f ReqBodyContentType) -> Req ftype -> f (Req ftype) Source #
reqReturnType :: forall ftype f. Functor f => (Maybe ftype -> f (Maybe ftype)) -> Req ftype -> f (Req ftype) Source #
reqFuncName :: forall ftype f. Functor f => (FunctionName -> f FunctionName) -> Req ftype -> f (Req ftype) Source #
path :: forall ftype f. Functor f => (Path ftype -> f (Path ftype)) -> Url ftype -> f (Url ftype) Source #
queryStr :: forall ftype f. Functor f => ([QueryArg ftype] -> f [QueryArg ftype]) -> Url ftype -> f (Url ftype) Source #
queryArgName :: forall ftype1 ftype2 f. Functor f => (Arg ftype1 -> f (Arg ftype2)) -> QueryArg ftype1 -> f (QueryArg ftype2) Source #
queryArgType :: forall ftype f. Functor f => (ArgType -> f ArgType) -> QueryArg ftype -> f (QueryArg ftype) Source #
headerArg :: forall ftype1 ftype2 f. Functor f => (Arg ftype1 -> f (Arg ftype2)) -> HeaderArg ftype1 -> f (HeaderArg ftype2) Source #
Prisms
_PathSegment :: Iso' PathSegment Text Source #
_HeaderArg :: forall ftype p f. (Choice p, Applicative f) => p (Arg ftype) (f (Arg ftype)) -> p (HeaderArg ftype) (f (HeaderArg ftype)) Source #
_ReplaceHeaderArg :: forall ftype p f. (Choice p, Applicative f) => p (Arg ftype, Text) (f (Arg ftype, Text)) -> p (HeaderArg ftype) (f (HeaderArg ftype)) Source #
_Static :: forall ftype p f. (Choice p, Applicative f) => p PathSegment (f PathSegment) -> p (SegmentType ftype) (f (SegmentType ftype)) Source #
_Cap :: forall ftype1 ftype2 p f. (Choice p, Applicative f) => p (Arg ftype1) (f (Arg ftype2)) -> p (SegmentType ftype1) (f (SegmentType ftype2)) Source #
Re-exports
Constructors
NoContent |
Instances
Generic NoContent | |||||
Defined in Servant.API.ContentTypes Associated Types
| |||||
Read NoContent | |||||
Defined in Servant.API.ContentTypes | |||||
Show NoContent | |||||
NFData NoContent | |||||
Defined in Servant.API.ContentTypes | |||||
Eq NoContent | |||||
HasStatus NoContent | |||||
Defined in Servant.API.UVerb Associated Types
| |||||
HasForeignType NoTypes NoContent (a :: k) Source # | Use if the foreign language does not have any types. | ||||
AllMime (ctyp ': (ctyp' ': ctyps)) => AllMimeRender (ctyp ': (ctyp' ': ctyps)) NoContent | |||||
Defined in Servant.API.ContentTypes Methods allMimeRender :: Proxy (ctyp ': (ctyp' ': ctyps)) -> NoContent -> [(MediaType, ByteString)] | |||||
Accept ctyp => AllMimeRender '[ctyp] NoContent | |||||
Defined in Servant.API.ContentTypes Methods allMimeRender :: Proxy '[ctyp] -> NoContent -> [(MediaType, ByteString)] | |||||
type Rep NoContent | |||||
Defined in Servant.API.ContentTypes type Rep NoContent = D1 ('MetaData "NoContent" "Servant.API.ContentTypes" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (C1 ('MetaCons "NoContent" 'PrefixI 'False) (U1 :: Type -> Type)) | |||||
type StatusOf NoContent | |||||
Defined in Servant.API.UVerb |
Constructors
a :<|> b |
Instances
Bifoldable (:<|>) | |
Bifunctor (:<|>) | |
Bitraversable (:<|>) | |
Defined in Servant.API.Alternative Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> (a :<|> b) -> f (c :<|> d) | |
Biapplicative (:<|>) | |
Defined in Servant.API.Alternative | |
(HasForeign lang ftype a, HasForeign lang ftype b) => HasForeign (lang :: k) ftype (a :<|> b) Source # | |
Defined in Servant.Foreign.Internal | |
(HasLink a, HasLink b) => HasLink (a :<|> b :: Type) | |
(GenerateList ftype start, GenerateList ftype rest) => GenerateList ftype (start :<|> rest) Source # | |
Defined in Servant.Foreign.Internal Methods generateList :: (start :<|> rest) -> [Req ftype] Source # | |
Foldable ((:<|>) a) | |
Defined in Servant.API.Alternative Methods fold :: Monoid m => (a :<|> m) -> m foldMap :: Monoid m => (a0 -> m) -> (a :<|> a0) -> m foldMap' :: Monoid m => (a0 -> m) -> (a :<|> a0) -> m foldr :: (a0 -> b -> b) -> b -> (a :<|> a0) -> b foldr' :: (a0 -> b -> b) -> b -> (a :<|> a0) -> b foldl :: (b -> a0 -> b) -> b -> (a :<|> a0) -> b foldl' :: (b -> a0 -> b) -> b -> (a :<|> a0) -> b foldr1 :: (a0 -> a0 -> a0) -> (a :<|> a0) -> a0 foldl1 :: (a0 -> a0 -> a0) -> (a :<|> a0) -> a0 elem :: Eq a0 => a0 -> (a :<|> a0) -> Bool maximum :: Ord a0 => (a :<|> a0) -> a0 minimum :: Ord a0 => (a :<|> a0) -> a0 | |
Traversable ((:<|>) a) | |
Functor ((:<|>) a) | |
(Monoid a, Monoid b) => Monoid (a :<|> b) | |
(Semigroup a, Semigroup b) => Semigroup (a :<|> b) | |
(Bounded a, Bounded b) => Bounded (a :<|> b) | |
Defined in Servant.API.Alternative | |
(Show a, Show b) => Show (a :<|> b) | |
(Eq a, Eq b) => Eq (a :<|> b) | |
type Foreign ftype (a :<|> b) Source # | |
type MkLink (a :<|> b :: Type) r | |
Constructors
EmptyAPI |
Instances
Bounded EmptyAPI | |||||
Defined in Servant.API.Empty | |||||
Enum EmptyAPI | |||||
Defined in Servant.API.Empty | |||||
Show EmptyAPI | |||||
Eq EmptyAPI | |||||
HasLink EmptyAPI | |||||
HasForeign (lang :: k) ftype EmptyAPI Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
type Foreign ftype EmptyAPI Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink EmptyAPI a | |||||
Defined in Servant.Links |
data Capture' (mods :: [Type]) (sym :: Symbol) a #
Instances
(KnownSymbol sym, HasForeignType lang ftype t, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Capture' mods sym t :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(ToHttpApiData v, HasLink sub) => HasLink (Capture' mods sym v :> sub :: Type) | |||||
type Foreign ftype (Capture' mods sym t :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (Capture' mods sym v :> sub :: Type) a | |||||
Defined in Servant.Links |
Instances
(KnownSymbol path, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (path :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (HttpVersion :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (HttpVersion :> api) -> Req ftype -> Foreign ftype (HttpVersion :> api) Source # | |||||
(KnownSymbol sym, HasForeignType lang ftype t, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Capture' mods sym t :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(KnownSymbol sym, HasForeignType lang ftype [t], HasForeign lang ftype sublayout) => HasForeign (lang :: k) ftype (CaptureAll sym t :> sublayout) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (CaptureAll sym t :> sublayout) -> Req ftype -> Foreign ftype (CaptureAll sym t :> sublayout) Source # | |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (Description desc :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Description desc :> api) -> Req ftype -> Foreign ftype (Description desc :> api) Source # | |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (Summary desc :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(HasForeignType lang ftype (Maybe a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Fragment a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(KnownSymbol sym, HasForeignType lang ftype (RequiredArgument mods a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Header' mods sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (IsSecure :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(KnownSymbol sym, HasForeignType lang ftype Bool, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryFlag sym :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(KnownSymbol sym, HasForeignType lang ftype (RequiredArgument mods a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryParam' mods sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryParam' mods sym a :> api) -> Req ftype -> Foreign ftype (QueryParam' mods sym a :> api) Source # | |||||
(KnownSymbol sym, HasForeignType lang ftype [a], HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryParams sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryParams sym a :> api) -> Req ftype -> Foreign ftype (QueryParams sym a :> api) Source # | |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (RemoteHost :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (RemoteHost :> api) -> Req ftype -> Foreign ftype (RemoteHost :> api) Source # | |||||
(Elem JSON list, HasForeignType lang ftype a, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (ReqBody' mods list a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (StreamBody' mods framing ctype a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (StreamBody' mods framing ctype a :> api) -> Req ftype -> Foreign ftype (StreamBody' mods framing ctype a :> api) Source # | |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (Vault :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasForeign lang ftype api => HasForeign (lang :: k1) ftype (WithResource res :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (WithResource res :> api) -> Req ftype -> Foreign ftype (WithResource res :> api) Source # | |||||
(TypeError (PartialApplication (HasLink :: Type -> Constraint) arr) :: Constraint) => HasLink (arr :> sub :: Type) | |||||
(KnownSymbol sym, HasLink sub) => HasLink (sym :> sub :: Type) | |||||
HasLink sub => HasLink (HttpVersion :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (HttpVersion :> sub) -> Link -> MkLink (HttpVersion :> sub) a # | |||||
HasLink sub => HasLink (BasicAuth realm a :> sub :: Type) | |||||
(ToHttpApiData v, HasLink sub) => HasLink (Capture' mods sym v :> sub :: Type) | |||||
(ToHttpApiData v, HasLink sub) => HasLink (CaptureAll sym v :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (CaptureAll sym v :> sub) -> Link -> MkLink (CaptureAll sym v :> sub) a # | |||||
HasLink sub => HasLink (Description s :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (Description s :> sub) -> Link -> MkLink (Description s :> sub) a # | |||||
HasLink sub => HasLink (Summary s :> sub :: Type) | |||||
HasLink sub => HasLink (AuthProtect tag :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (AuthProtect tag :> sub) -> Link -> MkLink (AuthProtect tag :> sub) a # | |||||
(HasLink sub, ToHttpApiData v) => HasLink (Fragment v :> sub :: Type) | |||||
HasLink sub => HasLink (Header' mods sym a :> sub :: Type) | |||||
HasLink sub => HasLink (IsSecure :> sub :: Type) | |||||
(KnownSymbol sym, HasLink sub) => HasLink (QueryFlag sym :> sub :: Type) | |||||
(KnownSymbol sym, ToHttpApiData v, HasLink sub, SBoolI (FoldRequired mods)) => HasLink (QueryParam' mods sym v :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (QueryParam' mods sym v :> sub) -> Link -> MkLink (QueryParam' mods sym v :> sub) a # | |||||
(KnownSymbol sym, ToHttpApiData v, HasLink sub) => HasLink (QueryParams sym v :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (QueryParams sym v :> sub) -> Link -> MkLink (QueryParams sym v :> sub) a # | |||||
HasLink sub => HasLink (RemoteHost :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (RemoteHost :> sub) -> Link -> MkLink (RemoteHost :> sub) a # | |||||
HasLink sub => HasLink (ReqBody' mods ct a :> sub :: Type) | |||||
HasLink sub => HasLink (StreamBody' mods framing ct a :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a0) -> Proxy (StreamBody' mods framing ct a :> sub) -> Link -> MkLink (StreamBody' mods framing ct a :> sub) a0 # | |||||
HasLink sub => HasLink (WithResource res :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (WithResource res :> sub) -> Link -> MkLink (WithResource res :> sub) a # | |||||
HasLink sub => HasLink (Vault :> sub :: Type) | |||||
(TypeError (NoInstanceForSub (HasLink :: Type -> Constraint) ty) :: Constraint) => HasLink (ty :> sub :: Type) | |||||
type Foreign ftype (path :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (HttpVersion :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (Capture' mods sym t :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (CaptureAll sym t :> sublayout) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (Description desc :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (Summary desc :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (Fragment a :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (Header' mods sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (IsSecure :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (QueryFlag sym :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (QueryParam' mods sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (QueryParams sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (RemoteHost :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (ReqBody' mods list a :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (StreamBody' mods framing ctype a :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (WithResource res :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type Foreign ftype (Vault :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (arr :> sub :: Type) _1 | |||||
Defined in Servant.Links | |||||
type MkLink (sym :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type MkLink (HttpVersion :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type MkLink (BasicAuth realm a :> sub :: Type) r | |||||
Defined in Servant.Links | |||||
type MkLink (Capture' mods sym v :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type MkLink (CaptureAll sym v :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type MkLink (Description s :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type MkLink (Summary s :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type MkLink (AuthProtect tag :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type MkLink (Fragment v :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type MkLink (Header' mods sym a :> sub :: Type) r | |||||
Defined in Servant.Links | |||||
type MkLink (IsSecure :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type MkLink (QueryFlag sym :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type MkLink (QueryParam' mods sym v :> sub :: Type) a | |||||
Defined in Servant.Links type MkLink (QueryParam' mods sym v :> sub :: Type) a = If (FoldRequired mods) v (Maybe v) -> MkLink sub a | |||||
type MkLink (QueryParams sym v :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type MkLink (RemoteHost :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type MkLink (ReqBody' mods ct a :> sub :: Type) r | |||||
Defined in Servant.Links | |||||
type MkLink (StreamBody' mods framing ct a :> sub :: Type) r | |||||
Defined in Servant.Links | |||||
type MkLink (WithResource res :> sub :: Type) a | |||||
Defined in Servant.Links | |||||
type MkLink (Vault :> sub :: Type) a | |||||
Defined in Servant.Links |
data CaptureAll (sym :: Symbol) a #
Instances
(KnownSymbol sym, HasForeignType lang ftype [t], HasForeign lang ftype sublayout) => HasForeign (lang :: k) ftype (CaptureAll sym t :> sublayout) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (CaptureAll sym t :> sublayout) -> Req ftype -> Foreign ftype (CaptureAll sym t :> sublayout) Source # | |||||
(ToHttpApiData v, HasLink sub) => HasLink (CaptureAll sym v :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (CaptureAll sym v :> sub) -> Link -> MkLink (CaptureAll sym v :> sub) a # | |||||
type Foreign ftype (CaptureAll sym t :> sublayout) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (CaptureAll sym v :> sub :: Type) a | |||||
Defined in Servant.Links |
Instances
Accept JSON | |
Defined in Servant.API.ContentTypes | |
ToJSON a => MimeRender JSON a | |
Defined in Servant.API.ContentTypes Methods mimeRender :: Proxy JSON -> a -> ByteString # | |
FromJSON a => MimeUnrender JSON a | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy JSON -> ByteString -> Either String a # mimeUnrenderWithType :: Proxy JSON -> MediaType -> ByteString -> Either String a # | |
MimeRender JSON a => MimeRender JSON (WithStatus _status a) | |
Defined in Servant.API.UVerb Methods mimeRender :: Proxy JSON -> WithStatus _status a -> ByteString # | |
MimeUnrender JSON a => MimeUnrender JSON (WithStatus _status a) | |
Defined in Servant.API.UVerb Methods mimeUnrender :: Proxy JSON -> ByteString -> Either String (WithStatus _status a) # mimeUnrenderWithType :: Proxy JSON -> MediaType -> ByteString -> Either String (WithStatus _status a) # |
class ReflectMethod (a :: k) where #
Methods
reflectMethod :: Proxy a -> Method #
Instances
ReflectMethod 'CONNECT | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'CONNECT -> Method # | |
ReflectMethod 'DELETE | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'DELETE -> Method # | |
ReflectMethod 'GET | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'GET -> Method # | |
ReflectMethod 'HEAD | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'HEAD -> Method # | |
ReflectMethod 'OPTIONS | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'OPTIONS -> Method # | |
ReflectMethod 'PATCH | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'PATCH -> Method # | |
ReflectMethod 'POST | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'POST -> Method # | |
ReflectMethod 'PUT | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'PUT -> Method # | |
ReflectMethod 'TRACE | |
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'TRACE -> Method # |
data Verb (method :: k1) (statusCode :: Nat) (contentTypes :: [Type]) a #
Instances
(Elem JSON list, HasForeignType lang ftype a, ReflectMethod method) => HasForeign (lang :: k) ftype (Verb method status list a) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasLink (Verb m s ct a :: Type) | |||||
Generic (Verb method statusCode contentTypes a) | |||||
Defined in Servant.API.Verbs Associated Types
| |||||
AtMostOneFragment (Verb m s ct typ) | |||||
Defined in Servant.API.TypeLevel | |||||
type Foreign ftype (Verb method status list a) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (Verb m s ct a :: Type) r | |||||
Defined in Servant.Links | |||||
type Rep (Verb method statusCode contentTypes a) | |||||
Defined in Servant.API.Verbs type Rep (Verb method statusCode contentTypes a) = D1 ('MetaData "Verb" "Servant.API.Verbs" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (V1 :: Type -> Type) |
data NoContentVerb (method :: k1) #
Instances
(HasForeignType lang ftype NoContent, ReflectMethod method) => HasForeign (lang :: k) ftype (NoContentVerb method) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (NoContentVerb method) -> Req ftype -> Foreign ftype (NoContentVerb method) Source # | |||||
HasLink (NoContentVerb m :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (NoContentVerb m) -> Link -> MkLink (NoContentVerb m) a # | |||||
Generic (NoContentVerb method) | |||||
Defined in Servant.API.Verbs Associated Types
Methods from :: NoContentVerb method -> Rep (NoContentVerb method) x to :: Rep (NoContentVerb method) x -> NoContentVerb method | |||||
type Foreign ftype (NoContentVerb method) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (NoContentVerb m :: Type) r | |||||
Defined in Servant.Links | |||||
type Rep (NoContentVerb method) | |||||
Defined in Servant.API.Verbs type Rep (NoContentVerb method) = D1 ('MetaData "NoContentVerb" "Servant.API.Verbs" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (V1 :: Type -> Type) |
data Stream (method :: k1) (status :: Nat) framing contentType a #
Instances
(ct ~ JSON, HasForeignType lang ftype a, ReflectMethod method) => HasForeign (lang :: k) ftype (Stream method status framing ct a) Source # | TODO: doesn't taking framing into account. | ||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasLink (Stream m status fr ct a :: Type) | |||||
Generic (Stream method status framing contentType a) | |||||
Defined in Servant.API.Stream Associated Types
| |||||
type Foreign ftype (Stream method status framing ct a) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (Stream m status fr ct a :: Type) r | |||||
Defined in Servant.Links | |||||
type Rep (Stream method status framing contentType a) | |||||
Defined in Servant.API.Stream type Rep (Stream method status framing contentType a) = D1 ('MetaData "Stream" "Servant.API.Stream" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (V1 :: Type -> Type) |
data Header' (mods :: [Type]) (sym :: Symbol) a #
Instances
(KnownSymbol h, ToHttpApiData v) => AddHeader mods h v (Headers (fst ': rest) a) (Headers (Header' mods h v ': (fst ': rest)) a) | |||||
Defined in Servant.API.ResponseHeaders Methods addOptionalHeader :: ResponseHeader h v -> Headers (fst ': rest) a -> Headers (Header' mods h v ': (fst ': rest)) a | |||||
(KnownSymbol sym, HasForeignType lang ftype (RequiredArgument mods a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Header' mods sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasResponseHeader h a (Header' mods h a ': rest) | |||||
Defined in Servant.API.ResponseHeaders Methods hlistLookupHeader :: HList (Header' mods h a ': rest) -> ResponseHeader h a | |||||
HasLink sub => HasLink (Header' mods sym a :> sub :: Type) | |||||
(FromHttpApiData v, BuildHeadersTo xs, KnownSymbol h) => BuildHeadersTo (Header' mods h v ': xs) | |||||
Defined in Servant.API.ResponseHeaders Methods buildHeadersTo :: [Header] -> HList (Header' mods h v ': xs) # | |||||
(KnownSymbol h, GetHeadersFromHList rest, ToHttpApiData v) => GetHeaders' (Header' mods h v ': rest) | |||||
Defined in Servant.API.ResponseHeaders Methods getHeaders' :: Headers (Header' mods h v ': rest) a -> [Header] | |||||
(KnownSymbol h, ToHttpApiData x, GetHeadersFromHList xs) => GetHeadersFromHList (Header' mods h x ': xs) | |||||
Defined in Servant.API.ResponseHeaders Methods getHeadersFromHList :: HList (Header' mods h x ': xs) -> [Header] | |||||
type Foreign ftype (Header' mods sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (Header' mods sym a :> sub :: Type) r | |||||
Defined in Servant.Links |
data QueryParam' (mods :: [Type]) (sym :: Symbol) a #
Instances
(KnownSymbol sym, HasForeignType lang ftype (RequiredArgument mods a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryParam' mods sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryParam' mods sym a :> api) -> Req ftype -> Foreign ftype (QueryParam' mods sym a :> api) Source # | |||||
(KnownSymbol sym, ToHttpApiData v, HasLink sub, SBoolI (FoldRequired mods)) => HasLink (QueryParam' mods sym v :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (QueryParam' mods sym v :> sub) -> Link -> MkLink (QueryParam' mods sym v :> sub) a # | |||||
type Foreign ftype (QueryParam' mods sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (QueryParam' mods sym v :> sub :: Type) a | |||||
Defined in Servant.Links type MkLink (QueryParam' mods sym v :> sub :: Type) a = If (FoldRequired mods) v (Maybe v) -> MkLink sub a |
data QueryParams (sym :: Symbol) a #
Instances
(KnownSymbol sym, HasForeignType lang ftype [a], HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryParams sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (QueryParams sym a :> api) -> Req ftype -> Foreign ftype (QueryParams sym a :> api) Source # | |||||
(KnownSymbol sym, ToHttpApiData v, HasLink sub) => HasLink (QueryParams sym v :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (QueryParams sym v :> sub) -> Link -> MkLink (QueryParams sym v :> sub) a # | |||||
type Foreign ftype (QueryParams sym a :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (QueryParams sym v :> sub :: Type) a | |||||
Defined in Servant.Links |
data QueryFlag (sym :: Symbol) #
Instances
(KnownSymbol sym, HasForeignType lang ftype Bool, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (QueryFlag sym :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(KnownSymbol sym, HasLink sub) => HasLink (QueryFlag sym :> sub :: Type) | |||||
type Foreign ftype (QueryFlag sym :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (QueryFlag sym :> sub :: Type) a | |||||
Defined in Servant.Links |
Instances
(HasForeignType lang ftype (Maybe a), HasForeign lang ftype api) => HasForeign (lang :: k) ftype (Fragment a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
(HasLink sub, ToHttpApiData v) => HasLink (Fragment v :> sub :: Type) | |||||
AtMostOneFragment (Fragment a) | |||||
Defined in Servant.API.TypeLevel | |||||
type Foreign ftype (Fragment a :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (Fragment v :> sub :: Type) a | |||||
Defined in Servant.Links |
Instances
HasLink Raw | |||||
HasForeign (lang :: k) ftype Raw Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
type Foreign ftype Raw Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink Raw a | |||||
Defined in Servant.Links |
data ReqBody' (mods :: [Type]) (contentTypes :: [Type]) a #
Instances
(Elem JSON list, HasForeignType lang ftype a, HasForeign lang ftype api) => HasForeign (lang :: k) ftype (ReqBody' mods list a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasLink sub => HasLink (ReqBody' mods ct a :> sub :: Type) | |||||
type Foreign ftype (ReqBody' mods list a :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (ReqBody' mods ct a :> sub :: Type) r | |||||
Defined in Servant.Links |
data StreamBody' (mods :: [Type]) framing contentType a #
Instances
HasForeign lang ftype api => HasForeign (lang :: k) ftype (StreamBody' mods framing ctype a :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (StreamBody' mods framing ctype a :> api) -> Req ftype -> Foreign ftype (StreamBody' mods framing ctype a :> api) Source # | |||||
HasLink sub => HasLink (StreamBody' mods framing ct a :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a0) -> Proxy (StreamBody' mods framing ct a :> sub) -> Link -> MkLink (StreamBody' mods framing ct a :> sub) a0 # | |||||
Generic (StreamBody' mods framing contentType a) | |||||
Defined in Servant.API.Stream Associated Types
Methods from :: StreamBody' mods framing contentType a -> Rep (StreamBody' mods framing contentType a) x to :: Rep (StreamBody' mods framing contentType a) x -> StreamBody' mods framing contentType a | |||||
type Foreign ftype (StreamBody' mods framing ctype a :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (StreamBody' mods framing ct a :> sub :: Type) r | |||||
Defined in Servant.Links | |||||
type Rep (StreamBody' mods framing contentType a) | |||||
Defined in Servant.API.Stream type Rep (StreamBody' mods framing contentType a) = D1 ('MetaData "StreamBody'" "Servant.API.Stream" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (V1 :: Type -> Type) |
data RemoteHost #
Instances
HasForeign lang ftype api => HasForeign (lang :: k) ftype (RemoteHost :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (RemoteHost :> api) -> Req ftype -> Foreign ftype (RemoteHost :> api) Source # | |||||
HasLink sub => HasLink (RemoteHost :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (RemoteHost :> sub) -> Link -> MkLink (RemoteHost :> sub) a # | |||||
type Foreign ftype (RemoteHost :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (RemoteHost :> sub :: Type) a | |||||
Defined in Servant.Links |
Instances
Generic IsSecure | |||||
Defined in Servant.API.IsSecure Associated Types
| |||||
Read IsSecure | |||||
Defined in Servant.API.IsSecure | |||||
Show IsSecure | |||||
Eq IsSecure | |||||
Ord IsSecure | |||||
Defined in Servant.API.IsSecure | |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (IsSecure :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasLink sub => HasLink (IsSecure :> sub :: Type) | |||||
type Rep IsSecure | |||||
Defined in Servant.API.IsSecure type Rep IsSecure = D1 ('MetaData "IsSecure" "Servant.API.IsSecure" "servant-0.20.2-FENStCMHkeG8BSpEeBte6I" 'False) (C1 ('MetaCons "Secure" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NotSecure" 'PrefixI 'False) (U1 :: Type -> Type)) | |||||
type Foreign ftype (IsSecure :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (IsSecure :> sub :: Type) a | |||||
Defined in Servant.Links |
data WithNamedContext (name :: Symbol) (subContext :: [Type]) (subApi :: k) #
Instances
HasForeign lang ftype api => HasForeign (lang :: k) ftype (WithNamedContext name context api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (WithNamedContext name context api) -> Req ftype -> Foreign ftype (WithNamedContext name context api) Source # | |||||
HasLink sub => HasLink (WithNamedContext name context sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (WithNamedContext name context sub) -> Link -> MkLink (WithNamedContext name context sub) a # | |||||
type Foreign ftype (WithNamedContext name context api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (WithNamedContext name context sub :: Type) a | |||||
Defined in Servant.Links |
data WithResource (res :: k) #
Instances
HasForeign lang ftype api => HasForeign (lang :: k1) ftype (WithResource res :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (WithResource res :> api) -> Req ftype -> Foreign ftype (WithResource res :> api) Source # | |||||
HasLink sub => HasLink (WithResource res :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (WithResource res :> sub) -> Link -> MkLink (WithResource res :> sub) a # | |||||
type Foreign ftype (WithResource res :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (WithResource res :> sub :: Type) a | |||||
Defined in Servant.Links |
data HttpVersion #
Constructors
HttpVersion | |
Instances
Data HttpVersion | |||||
Defined in Network.HTTP.Types.Version Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> HttpVersion -> c HttpVersion gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c HttpVersion toConstr :: HttpVersion -> Constr dataTypeOf :: HttpVersion -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c HttpVersion) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c HttpVersion) gmapT :: (forall b. Data b => b -> b) -> HttpVersion -> HttpVersion gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> HttpVersion -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> HttpVersion -> r gmapQ :: (forall d. Data d => d -> u) -> HttpVersion -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> HttpVersion -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> HttpVersion -> m HttpVersion gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> HttpVersion -> m HttpVersion gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> HttpVersion -> m HttpVersion | |||||
Generic HttpVersion | |||||
Defined in Network.HTTP.Types.Version Associated Types
| |||||
Show HttpVersion | |||||
Defined in Network.HTTP.Types.Version Methods showsPrec :: Int -> HttpVersion -> ShowS show :: HttpVersion -> String showList :: [HttpVersion] -> ShowS | |||||
Eq HttpVersion | |||||
Defined in Network.HTTP.Types.Version | |||||
Ord HttpVersion | |||||
Defined in Network.HTTP.Types.Version Methods compare :: HttpVersion -> HttpVersion -> Ordering (<) :: HttpVersion -> HttpVersion -> Bool (<=) :: HttpVersion -> HttpVersion -> Bool (>) :: HttpVersion -> HttpVersion -> Bool (>=) :: HttpVersion -> HttpVersion -> Bool max :: HttpVersion -> HttpVersion -> HttpVersion min :: HttpVersion -> HttpVersion -> HttpVersion | |||||
HasForeign lang ftype api => HasForeign (lang :: k) ftype (HttpVersion :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (HttpVersion :> api) -> Req ftype -> Foreign ftype (HttpVersion :> api) Source # | |||||
HasLink sub => HasLink (HttpVersion :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (HttpVersion :> sub) -> Link -> MkLink (HttpVersion :> sub) a # | |||||
type Rep HttpVersion | |||||
Defined in Network.HTTP.Types.Version type Rep HttpVersion = D1 ('MetaData "HttpVersion" "Network.HTTP.Types.Version" "http-types-0.12.4-CgK3BWPrdpV5aP47TlQ3wt" 'False) (C1 ('MetaCons "HttpVersion" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpMajor") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int) :*: S1 ('MetaSel ('Just "httpMinor") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Int))) | |||||
type Foreign ftype (HttpVersion :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (HttpVersion :> sub :: Type) a | |||||
Defined in Servant.Links |
data Summary (sym :: Symbol) #
Instances
HasForeign lang ftype api => HasForeign (lang :: k) ftype (Summary desc :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
| |||||
HasLink sub => HasLink (Summary s :> sub :: Type) | |||||
type Foreign ftype (Summary desc :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (Summary s :> sub :: Type) a | |||||
Defined in Servant.Links |
data Description (sym :: Symbol) #
Instances
HasForeign lang ftype api => HasForeign (lang :: k) ftype (Description desc :> api) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (Description desc :> api) -> Req ftype -> Foreign ftype (Description desc :> api) Source # | |||||
HasLink sub => HasLink (Description s :> sub :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (Description s :> sub) -> Link -> MkLink (Description s :> sub) a # | |||||
type Foreign ftype (Description desc :> api) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (Description s :> sub :: Type) a | |||||
Defined in Servant.Links |
type ToServantApi (routes :: Type -> Type) = ToServant routes AsApi #
data NamedRoutes (api :: Type -> Type) #
Instances
HasForeign lang ftype (ToServantApi r) => HasForeign (lang :: k) ftype (NamedRoutes r) Source # | |||||
Defined in Servant.Foreign.Internal Associated Types
Methods foreignFor :: Proxy lang -> Proxy ftype -> Proxy (NamedRoutes r) -> Req ftype -> Foreign ftype (NamedRoutes r) Source # | |||||
(HasLink (ToServantApi routes), forall a. GLink routes a, ErrorIfNoGeneric routes) => HasLink (NamedRoutes routes :: Type) | |||||
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (NamedRoutes routes) -> Link -> MkLink (NamedRoutes routes) a # | |||||
type Foreign ftype (NamedRoutes r) Source # | |||||
Defined in Servant.Foreign.Internal | |||||
type MkLink (NamedRoutes routes :: Type) a | |||||
Defined in Servant.Links |
data ResponseHeader (sym :: Symbol) a #
Constructors
Header a | |
MissingHeader | |
UndecodableHeader ByteString |
Instances
Functor (ResponseHeader sym) | |
Defined in Servant.API.ResponseHeaders Methods fmap :: (a -> b) -> ResponseHeader sym a -> ResponseHeader sym b (<$) :: a -> ResponseHeader sym b -> ResponseHeader sym a | |
Show a => Show (ResponseHeader sym a) | |
Defined in Servant.API.ResponseHeaders Methods showsPrec :: Int -> ResponseHeader sym a -> ShowS show :: ResponseHeader sym a -> String showList :: [ResponseHeader sym a] -> ShowS | |
NFData a => NFData (ResponseHeader sym a) | |
Defined in Servant.API.ResponseHeaders Methods rnf :: ResponseHeader sym a -> () | |
Eq a => Eq (ResponseHeader sym a) | |
Defined in Servant.API.ResponseHeaders Methods (==) :: ResponseHeader sym a -> ResponseHeader sym a -> Bool (/=) :: ResponseHeader sym a -> ResponseHeader sym a -> Bool |
Instances
Data StdMethod | |||||
Defined in Network.HTTP.Types.Method Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StdMethod -> c StdMethod gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StdMethod toConstr :: StdMethod -> Constr dataTypeOf :: StdMethod -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c StdMethod) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StdMethod) gmapT :: (forall b. Data b => b -> b) -> StdMethod -> StdMethod gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StdMethod -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StdMethod -> r gmapQ :: (forall d. Data d => d -> u) -> StdMethod -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> StdMethod -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StdMethod -> m StdMethod | |||||
Bounded StdMethod | |||||
Defined in Network.HTTP.Types.Method | |||||
Enum StdMethod | |||||
Defined in Network.HTTP.Types.Method | |||||
Generic StdMethod | |||||
Defined in Network.HTTP.Types.Method Associated Types
| |||||
Ix StdMethod | |||||
Defined in Network.HTTP.Types.Method Methods range :: (StdMethod, StdMethod) -> [StdMethod] index :: (StdMethod, StdMethod) -> StdMethod -> Int unsafeIndex :: (StdMethod, StdMethod) -> StdMethod -> Int inRange :: (StdMethod, StdMethod) -> StdMethod -> Bool rangeSize :: (StdMethod, StdMethod) -> Int unsafeRangeSize :: (StdMethod, StdMethod) -> Int | |||||
Read StdMethod | |||||
Defined in Network.HTTP.Types.Method | |||||
Show StdMethod | |||||
Eq StdMethod | |||||
Ord StdMethod | |||||
Defined in Network.HTTP.Types.Method | |||||
ReflectMethod 'CONNECT | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'CONNECT -> Method # | |||||
ReflectMethod 'DELETE | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'DELETE -> Method # | |||||
ReflectMethod 'GET | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'GET -> Method # | |||||
ReflectMethod 'HEAD | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'HEAD -> Method # | |||||
ReflectMethod 'OPTIONS | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'OPTIONS -> Method # | |||||
ReflectMethod 'PATCH | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'PATCH -> Method # | |||||
ReflectMethod 'POST | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'POST -> Method # | |||||
ReflectMethod 'PUT | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'PUT -> Method # | |||||
ReflectMethod 'TRACE | |||||
Defined in Servant.API.Verbs Methods reflectMethod :: Proxy 'TRACE -> Method # | |||||
type Rep StdMethod | |||||
Defined in Network.HTTP.Types.Method type Rep StdMethod = D1 ('MetaData "StdMethod" "Network.HTTP.Types.Method" "http-types-0.12.4-CgK3BWPrdpV5aP47TlQ3wt" 'False) (((C1 ('MetaCons "GET" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "POST" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "HEAD" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PUT" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "DELETE" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TRACE" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CONNECT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "OPTIONS" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PATCH" 'PrefixI 'False) (U1 :: Type -> Type))))) |
data BasicAuthData #
Constructors
BasicAuthData | |
Fields
|
class Accept (ctype :: k) where #
Minimal complete definition
Instances
Accept FormUrlEncoded | |
Defined in Servant.API.ContentTypes Methods contentType :: Proxy FormUrlEncoded -> MediaType # contentTypes :: Proxy FormUrlEncoded -> NonEmpty MediaType # | |
Accept JSON | |
Defined in Servant.API.ContentTypes | |
Accept OctetStream | |
Defined in Servant.API.ContentTypes Methods contentType :: Proxy OctetStream -> MediaType # contentTypes :: Proxy OctetStream -> NonEmpty MediaType # | |
Accept PlainText | |
Defined in Servant.API.ContentTypes Methods contentType :: Proxy PlainText -> MediaType # contentTypes :: Proxy PlainText -> NonEmpty MediaType # |
data FormUrlEncoded #
Instances
class Accept ctype => MimeRender (ctype :: k) a where #
Methods
mimeRender :: Proxy ctype -> a -> ByteString #
Instances
class Accept ctype => MimeUnrender (ctype :: k) a where #
Minimal complete definition
Methods
mimeUnrender :: Proxy ctype -> ByteString -> Either String a #
mimeUnrenderWithType :: Proxy ctype -> MediaType -> ByteString -> Either String a #
Instances
FromForm a => MimeUnrender FormUrlEncoded a | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy FormUrlEncoded -> ByteString -> Either String a # mimeUnrenderWithType :: Proxy FormUrlEncoded -> MediaType -> ByteString -> Either String a # | |
FromJSON a => MimeUnrender JSON a | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy JSON -> ByteString -> Either String a # mimeUnrenderWithType :: Proxy JSON -> MediaType -> ByteString -> Either String a # | |
MimeUnrender OctetStream ByteString | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy OctetStream -> ByteString -> Either String ByteString # mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String ByteString # | |
MimeUnrender OctetStream ByteString | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy OctetStream -> ByteString -> Either String ByteString # mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String ByteString # | |
MimeUnrender PlainText Text | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy PlainText -> ByteString -> Either String Text # mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String Text # | |
MimeUnrender PlainText Text | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy PlainText -> ByteString -> Either String Text # mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String Text # | |
MimeUnrender PlainText String | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy PlainText -> ByteString -> Either String String # mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String String # | |
MimeUnrender FormUrlEncoded a => MimeUnrender FormUrlEncoded (WithStatus _status a) | |
Defined in Servant.API.UVerb Methods mimeUnrender :: Proxy FormUrlEncoded -> ByteString -> Either String (WithStatus _status a) # mimeUnrenderWithType :: Proxy FormUrlEncoded -> MediaType -> ByteString -> Either String (WithStatus _status a) # | |
MimeUnrender JSON a => MimeUnrender JSON (WithStatus _status a) | |
Defined in Servant.API.UVerb Methods mimeUnrender :: Proxy JSON -> ByteString -> Either String (WithStatus _status a) # mimeUnrenderWithType :: Proxy JSON -> MediaType -> ByteString -> Either String (WithStatus _status a) # | |
MimeUnrender OctetStream a => MimeUnrender OctetStream (WithStatus _status a) | |
Defined in Servant.API.UVerb Methods mimeUnrender :: Proxy OctetStream -> ByteString -> Either String (WithStatus _status a) # mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String (WithStatus _status a) # | |
MimeUnrender PlainText a => MimeUnrender PlainText (WithStatus _status a) | |
Defined in Servant.API.UVerb Methods mimeUnrender :: Proxy PlainText -> ByteString -> Either String (WithStatus _status a) # mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String (WithStatus _status a) # |
data OctetStream #
Instances
Accept OctetStream | |
Defined in Servant.API.ContentTypes Methods contentType :: Proxy OctetStream -> MediaType # contentTypes :: Proxy OctetStream -> NonEmpty MediaType # | |
MimeRender OctetStream ByteString | |
Defined in Servant.API.ContentTypes Methods mimeRender :: Proxy OctetStream -> ByteString -> ByteString # | |
MimeRender OctetStream ByteString | |
Defined in Servant.API.ContentTypes Methods mimeRender :: Proxy OctetStream -> ByteString -> ByteString # | |
MimeUnrender OctetStream ByteString | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy OctetStream -> ByteString -> Either String ByteString # mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String ByteString # | |
MimeUnrender OctetStream ByteString | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy OctetStream -> ByteString -> Either String ByteString # mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String ByteString # | |
MimeRender OctetStream a => MimeRender OctetStream (WithStatus _status a) | |
Defined in Servant.API.UVerb Methods mimeRender :: Proxy OctetStream -> WithStatus _status a -> ByteString # | |
MimeUnrender OctetStream a => MimeUnrender OctetStream (WithStatus _status a) | |
Defined in Servant.API.UVerb Methods mimeUnrender :: Proxy OctetStream -> ByteString -> Either String (WithStatus _status a) # mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String (WithStatus _status a) # |
Instances
Accept PlainText | |
Defined in Servant.API.ContentTypes Methods contentType :: Proxy PlainText -> MediaType # contentTypes :: Proxy PlainText -> NonEmpty MediaType # | |
MimeRender PlainText Text | |
Defined in Servant.API.ContentTypes Methods mimeRender :: Proxy PlainText -> Text -> ByteString # | |
MimeRender PlainText Text | |
Defined in Servant.API.ContentTypes Methods mimeRender :: Proxy PlainText -> Text -> ByteString # | |
MimeRender PlainText String | |
Defined in Servant.API.ContentTypes Methods mimeRender :: Proxy PlainText -> String -> ByteString # | |
MimeUnrender PlainText Text | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy PlainText -> ByteString -> Either String Text # mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String Text # | |
MimeUnrender PlainText Text | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy PlainText -> ByteString -> Either String Text # mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String Text # | |
MimeUnrender PlainText String | |
Defined in Servant.API.ContentTypes Methods mimeUnrender :: Proxy PlainText -> ByteString -> Either String String # mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String String # | |
MimeRender PlainText a => MimeRender PlainText (WithStatus _status a) | |
Defined in Servant.API.UVerb Methods mimeRender :: Proxy PlainText -> WithStatus _status a -> ByteString # | |
MimeUnrender PlainText a => MimeUnrender PlainText (WithStatus _status a) | |
Defined in Servant.API.UVerb Methods mimeUnrender :: Proxy PlainText -> ByteString -> Either String (WithStatus _status a) # mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String (WithStatus _status a) # |
data AuthProtect (tag :: k) #
Instances
HasLink sub => HasLink (AuthProtect tag :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (AuthProtect tag :> sub) -> Link -> MkLink (AuthProtect tag :> sub) a # | |
type MkLink (AuthProtect tag :> sub :: Type) a | |
Defined in Servant.Links |
class GenericMode (mode :: k) #
Instances
GenericMode AsApi | |||||
Defined in Servant.API.Generic Associated Types
| |||||
GenericMode (AsLink a :: Type) | |||||
Defined in Servant.Links |
type family (mode :: k) :- api #
Instances
type AsApi :- api | |
Defined in Servant.API.Generic | |
type (AsLink a :: Type) :- api | |
Defined in Servant.Links |
Instances
GenericMode AsApi | |||||
Defined in Servant.API.Generic Associated Types
| |||||
type AsApi :- api | |||||
Defined in Servant.API.Generic |
class GServantProduct (f :: k -> Type) #
Minimal complete definition
gtoServant, gfromServant
Instances
(GServantProduct l, GServantProduct r) => GServantProduct (l :*: r :: k -> Type) | |||||
Defined in Servant.API.Generic Associated Types
Methods gtoServant :: forall (p :: k). (l :*: r) p -> GToServant (l :*: r) gfromServant :: forall (p :: k). GToServant (l :*: r) -> (l :*: r) p | |||||
GServantProduct (K1 i c :: k -> Type) | |||||
Defined in Servant.API.Generic Associated Types
Methods gtoServant :: forall (p :: k). K1 i c p -> GToServant (K1 i c :: k -> Type) gfromServant :: forall (p :: k). GToServant (K1 i c :: k -> Type) -> K1 i c p | |||||
GServantProduct f => GServantProduct (M1 i c f :: k -> Type) | |||||
Defined in Servant.API.Generic Associated Types
Methods gtoServant :: forall (p :: k). M1 i c f p -> GToServant (M1 i c f) gfromServant :: forall (p :: k). GToServant (M1 i c f) -> M1 i c f p |
type GenericServant (routes :: k -> Type) (mode :: k) = (GenericMode mode, Generic (routes mode), GServantProduct (Rep (routes mode))) #
fromServant :: forall {k} routes (mode :: k). GenericServant routes mode => ToServant routes mode -> routes mode #
genericApi :: forall (routes :: Type -> Type). GenericServant routes AsApi => Proxy routes -> Proxy (ToServantApi routes) #
toServant :: forall {k} routes (mode :: k). GenericServant routes mode => routes mode -> ToServant routes mode #
type QueryParam = QueryParam' '[Optional, Strict] #
data QueryString #
class AddHeader (mods :: [Type]) (h :: Symbol) v orig new | mods h v orig -> new, new -> mods, new -> h, new -> v, new -> orig #
Minimal complete definition
addOptionalHeader
Instances
(KnownSymbol h, ToHttpApiData v, new ~ Headers '[Header' mods h v] a) => AddHeader mods h v a new | |
Defined in Servant.API.ResponseHeaders Methods addOptionalHeader :: ResponseHeader h v -> a -> new | |
(AddHeader mods h v old new, AddHeader mods h v (Union oldrest) (Union newrest), oldrest ~ (a ': as), newrest ~ (b ': bs)) => AddHeader mods h v (Union (old ': (a ': as))) (Union (new ': (b ': bs))) | |
Defined in Servant.API.ResponseHeaders Methods addOptionalHeader :: ResponseHeader h v -> Union (old ': (a ': as)) -> Union (new ': (b ': bs)) | |
AddHeader mods h v old new => AddHeader mods h v (Union '[old]) (Union '[new]) | |
Defined in Servant.API.ResponseHeaders Methods addOptionalHeader :: ResponseHeader h v -> Union '[old] -> Union '[new] | |
(KnownSymbol h, ToHttpApiData v) => AddHeader mods h v (Headers (fst ': rest) a) (Headers (Header' mods h v ': (fst ': rest)) a) | |
Defined in Servant.API.ResponseHeaders Methods addOptionalHeader :: ResponseHeader h v -> Headers (fst ': rest) a -> Headers (Header' mods h v ': (fst ': rest)) a |
class BuildHeadersTo (hs :: [Type]) where #
Methods
buildHeadersTo :: [Header] -> HList hs #
Instances
BuildHeadersTo ('[] :: [Type]) | |
Defined in Servant.API.ResponseHeaders Methods buildHeadersTo :: [Header] -> HList ('[] :: [Type]) # | |
(FromHttpApiData v, BuildHeadersTo xs, KnownSymbol h) => BuildHeadersTo (Header' mods h v ': xs) | |
Defined in Servant.API.ResponseHeaders Methods buildHeadersTo :: [Header] -> HList (Header' mods h v ': xs) # |
class GetHeaders ls where #
Methods
getHeaders :: ls -> [Header] #
Instances
GetHeadersFromHList hs => GetHeaders (HList hs) | |
Defined in Servant.API.ResponseHeaders Methods getHeaders :: HList hs -> [Header] # | |
GetHeaders' hs => GetHeaders (Headers hs a) | |
Defined in Servant.API.ResponseHeaders Methods getHeaders :: Headers hs a -> [Header] # |
data HList (a :: [Type]) where #
Constructors
HNil :: HList ('[] :: [Type]) | |
HCons :: forall (h :: Symbol) x (xs :: [Type]) (mods :: [Type]). ResponseHeader h x -> HList xs -> HList (Header' mods h x ': xs) |
Instances
NFDataHList xs => NFData (HList xs) | |
Defined in Servant.API.ResponseHeaders | |
GetHeadersFromHList hs => GetHeaders (HList hs) | |
Defined in Servant.API.ResponseHeaders Methods getHeaders :: HList hs -> [Header] # |
class HasResponseHeader (h :: Symbol) a (headers :: [Type]) #
Minimal complete definition
hlistLookupHeader
Instances
HasResponseHeader h a (Header' mods h a ': rest) | |
Defined in Servant.API.ResponseHeaders Methods hlistLookupHeader :: HList (Header' mods h a ': rest) -> ResponseHeader h a | |
HasResponseHeader h a rest => HasResponseHeader h a (first ': rest) | |
Defined in Servant.API.ResponseHeaders Methods hlistLookupHeader :: HList (first ': rest) -> ResponseHeader h a |
data Headers (ls :: [Type]) a #
Constructors
Headers | |
Fields
|
Instances
(KnownSymbol h, ToHttpApiData v) => AddHeader mods h v (Headers (fst ': rest) a) (Headers (Header' mods h v ': (fst ': rest)) a) | |
Defined in Servant.API.ResponseHeaders Methods addOptionalHeader :: ResponseHeader h v -> Headers (fst ': rest) a -> Headers (Header' mods h v ': (fst ': rest)) a | |
Functor (Headers ls) | |
(NFDataHList ls, NFData a) => NFData (Headers ls a) | |
Defined in Servant.API.ResponseHeaders | |
GetHeaders' hs => GetHeaders (Headers hs a) | |
Defined in Servant.API.ResponseHeaders Methods getHeaders :: Headers hs a -> [Header] # | |
HasStatus a => HasStatus (Headers ls a) | |
Defined in Servant.API.UVerb | |
type StatusOf (Headers ls a) | |
Defined in Servant.API.UVerb |
addHeader :: forall (h :: Symbol) v orig new. AddHeader '[Optional, Strict] h v orig new => v -> orig -> new #
addHeader' :: forall (mods :: [Type]) (h :: Symbol) v orig new. AddHeader mods h v orig new => v -> orig -> new #
lookupResponseHeader :: forall (h :: Symbol) a (headers :: [Type]) r. HasResponseHeader h a headers => Headers headers r -> ResponseHeader h a #
noHeader :: forall (h :: Symbol) v orig new. AddHeader '[Optional, Strict] h v orig new => orig -> new #
noHeader' :: forall (mods :: [Type]) (h :: Symbol) v orig new. AddHeader mods h v orig new => orig -> new #
class FramingRender (strategy :: k) where #
Methods
framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy strategy -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString #
Instances
FramingRender NetstringFraming | |
Defined in Servant.API.Stream Methods framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy NetstringFraming -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString # | |
FramingRender NewlineFraming | |
Defined in Servant.API.Stream Methods framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy NewlineFraming -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString # | |
FramingRender NoFraming | |
Defined in Servant.API.Stream Methods framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy NoFraming -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString # |
class FramingUnrender (strategy :: k) where #
Methods
framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy strategy -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a #
Instances
FramingUnrender NetstringFraming | |
Defined in Servant.API.Stream Methods framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy NetstringFraming -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a # | |
FramingUnrender NewlineFraming | |
Defined in Servant.API.Stream Methods framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy NewlineFraming -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a # | |
FramingUnrender NoFraming | |
Defined in Servant.API.Stream Methods framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy NoFraming -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a # |
class FromSourceIO chunk a | a -> chunk where #
Methods
fromSourceIO :: SourceIO chunk -> IO a #
Instances
MonadIO m => FromSourceIO a (SourceT m a) | |
Defined in Servant.API.Stream Methods fromSourceIO :: SourceIO a -> IO (SourceT m a) # |
data NetstringFraming #
Instances
FramingRender NetstringFraming | |
Defined in Servant.API.Stream Methods framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy NetstringFraming -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString # | |
FramingUnrender NetstringFraming | |
Defined in Servant.API.Stream Methods framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy NetstringFraming -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a # |
data NewlineFraming #
Instances
FramingRender NewlineFraming | |
Defined in Servant.API.Stream Methods framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy NewlineFraming -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString # | |
FramingUnrender NewlineFraming | |
Defined in Servant.API.Stream Methods framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy NewlineFraming -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a # |
Instances
FramingRender NoFraming | |
Defined in Servant.API.Stream Methods framingRender :: forall (m :: Type -> Type) a. Monad m => Proxy NoFraming -> (a -> ByteString) -> SourceT m a -> SourceT m ByteString # | |
FramingUnrender NoFraming | |
Defined in Servant.API.Stream Methods framingUnrender :: forall (m :: Type -> Type) a. Monad m => Proxy NoFraming -> (ByteString -> Either String a) -> SourceT m ByteString -> SourceT m a # |
type StreamBody = StreamBody' ('[] :: [Type]) #
type StreamPost = Stream 'POST 200 #
class ToSourceIO chunk a | a -> chunk where #
Methods
toSourceIO :: a -> SourceIO chunk #
Instances
ToSourceIO a (NonEmpty a) | |
Defined in Servant.API.Stream Methods toSourceIO :: NonEmpty a -> SourceIO a # | |
ToSourceIO a [a] | |
Defined in Servant.API.Stream Methods toSourceIO :: [a] -> SourceIO a # | |
SourceToSourceIO m => ToSourceIO chunk (SourceT m chunk) | |
Defined in Servant.API.Stream Methods toSourceIO :: SourceT m chunk -> SourceIO chunk # |
type family IsElem endpoint api where ... #
Equations
IsElem e (sa :<|> sb) = Or (IsElem e sa) (IsElem e sb) | |
IsElem (e :> sa) (e :> sb) = IsElem sa sb | |
IsElem sa (Header sym x :> sb) = IsElem sa sb | |
IsElem sa (Header' mods sym x :> sb) = IsElem sa sb | |
IsElem sa (ReqBody y x :> sb) = IsElem sa sb | |
IsElem (CaptureAll z y :> sa) (CaptureAll x y :> sb) = IsElem sa sb | |
IsElem (Capture z y :> sa) (Capture x y :> sb) = IsElem sa sb | |
IsElem sa (QueryParam x y :> sb) = IsElem sa sb | |
IsElem sa (QueryParams x y :> sb) = IsElem sa sb | |
IsElem sa (QueryFlag x :> sb) = IsElem sa sb | |
IsElem sa (Fragment x :> sb) = IsElem sa sb | |
IsElem (Verb m s ct typ) (Verb m s ct' typ) = IsSubList ct ct' | |
IsElem e e = () | |
IsElem e (NamedRoutes rs) = IsElem e (ToServantApi rs) | |
IsElem e a = IsElem' e a |
class KnownStatus (StatusOf a) => HasStatus a #
Instances
HasStatus NoContent | |||||
Defined in Servant.API.UVerb Associated Types
| |||||
HasStatus a => HasStatus (Headers ls a) | |||||
Defined in Servant.API.UVerb | |||||
KnownStatus n => HasStatus (WithStatus n a) | |||||
Defined in Servant.API.UVerb Associated Types
|
type family StatusOf a :: Nat #
Instances
type StatusOf NoContent | |
Defined in Servant.API.UVerb | |
type StatusOf (Headers ls a) | |
Defined in Servant.API.UVerb | |
type StatusOf (WithStatus n a) | |
Defined in Servant.API.UVerb |
type family Statuses (as :: [Type]) :: [Nat] #
Instances
type Statuses ('[] :: [Type]) | |
Defined in Servant.API.UVerb type Statuses ('[] :: [Type]) = '[] :: [Nat] | |
type Statuses (a ': as) | |
Defined in Servant.API.UVerb |
type family Statuses (as :: [Type]) :: [Nat] #
Instances
type Statuses ('[] :: [Type]) | |
Defined in Servant.API.UVerb type Statuses ('[] :: [Type]) = '[] :: [Nat] | |
type Statuses (a ': as) | |
Defined in Servant.API.UVerb |
data UVerb (method :: StdMethod) (contentTypes :: [Type]) (as :: [Type]) #
Instances
HasLink (UVerb m ct a :: Type) | |
AtMostOneFragment (UVerb m cts as) | |
Defined in Servant.API.TypeLevel | |
type MkLink (UVerb m ct a :: Type) r | |
Defined in Servant.Links |
newtype WithStatus (k :: Nat) a #
Constructors
WithStatus a |
Instances
MimeRender FormUrlEncoded a => MimeRender FormUrlEncoded (WithStatus _status a) | |||||
Defined in Servant.API.UVerb Methods mimeRender :: Proxy FormUrlEncoded -> WithStatus _status a -> ByteString # | |||||
MimeRender JSON a => MimeRender JSON (WithStatus _status a) | |||||
Defined in Servant.API.UVerb Methods mimeRender :: Proxy JSON -> WithStatus _status a -> ByteString # | |||||
MimeRender OctetStream a => MimeRender OctetStream (WithStatus _status a) | |||||
Defined in Servant.API.UVerb Methods mimeRender :: Proxy OctetStream -> WithStatus _status a -> ByteString # | |||||
MimeRender PlainText a => MimeRender PlainText (WithStatus _status a) | |||||
Defined in Servant.API.UVerb Methods mimeRender :: Proxy PlainText -> WithStatus _status a -> ByteString # | |||||
MimeUnrender FormUrlEncoded a => MimeUnrender FormUrlEncoded (WithStatus _status a) | |||||
Defined in Servant.API.UVerb Methods mimeUnrender :: Proxy FormUrlEncoded -> ByteString -> Either String (WithStatus _status a) # mimeUnrenderWithType :: Proxy FormUrlEncoded -> MediaType -> ByteString -> Either String (WithStatus _status a) # | |||||
MimeUnrender JSON a => MimeUnrender JSON (WithStatus _status a) | |||||
Defined in Servant.API.UVerb Methods mimeUnrender :: Proxy JSON -> ByteString -> Either String (WithStatus _status a) # mimeUnrenderWithType :: Proxy JSON -> MediaType -> ByteString -> Either String (WithStatus _status a) # | |||||
MimeUnrender OctetStream a => MimeUnrender OctetStream (WithStatus _status a) | |||||
Defined in Servant.API.UVerb Methods mimeUnrender :: Proxy OctetStream -> ByteString -> Either String (WithStatus _status a) # mimeUnrenderWithType :: Proxy OctetStream -> MediaType -> ByteString -> Either String (WithStatus _status a) # | |||||
MimeUnrender PlainText a => MimeUnrender PlainText (WithStatus _status a) | |||||
Defined in Servant.API.UVerb Methods mimeUnrender :: Proxy PlainText -> ByteString -> Either String (WithStatus _status a) # mimeUnrenderWithType :: Proxy PlainText -> MediaType -> ByteString -> Either String (WithStatus _status a) # | |||||
Show a => Show (WithStatus k a) | |||||
Defined in Servant.API.UVerb Methods showsPrec :: Int -> WithStatus k a -> ShowS show :: WithStatus k a -> String showList :: [WithStatus k a] -> ShowS | |||||
Eq a => Eq (WithStatus k a) | |||||
Defined in Servant.API.UVerb Methods (==) :: WithStatus k a -> WithStatus k a -> Bool (/=) :: WithStatus k a -> WithStatus k a -> Bool | |||||
KnownStatus n => HasStatus (WithStatus n a) | |||||
Defined in Servant.API.UVerb Associated Types
| |||||
type StatusOf (WithStatus n a) | |||||
Defined in Servant.API.UVerb |
type DeleteAccepted = Verb 'DELETE 202 #
type DeleteNoContent = NoContentVerb 'DELETE #
type DeleteNonAuthoritative = Verb 'DELETE 203 #
type GetAccepted = Verb 'GET 202 #
type GetNoContent = NoContentVerb 'GET #
type GetNonAuthoritative = Verb 'GET 203 #
type GetPartialContent = Verb 'GET 206 #
type GetResetContent = Verb 'GET 205 #
type PatchAccepted = Verb 'PATCH 202 #
type PatchNoContent = NoContentVerb 'PATCH #
type PatchNonAuthoritative = Verb 'PATCH 203 #
type PostAccepted = Verb 'POST 202 #
type PostCreated = Verb 'POST 201 #
type PostNoContent = NoContentVerb 'POST #
type PostNonAuthoritative = Verb 'POST 203 #
type PostResetContent = Verb 'POST 205 #
type PutAccepted = Verb 'PUT 202 #
type PutCreated = Verb 'PUT 201 #
type PutNoContent = NoContentVerb 'PUT #
type PutNonAuthoritative = Verb 'PUT 203 #
class HasLink (endpoint :: k) where #
Instances
HasLink EmptyAPI | |
HasLink Raw | |
HasLink RawM | |
(TypeError (NoInstanceFor (HasLink api)) :: Constraint) => HasLink (api :: k) | |
(HasLink (ToServantApi routes), forall a. GLink routes a, ErrorIfNoGeneric routes) => HasLink (NamedRoutes routes :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (NamedRoutes routes) -> Link -> MkLink (NamedRoutes routes) a # | |
(HasLink a, HasLink b) => HasLink (a :<|> b :: Type) | |
HasLink (NoContentVerb m :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (NoContentVerb m) -> Link -> MkLink (NoContentVerb m) a # | |
(TypeError (PartialApplication (HasLink :: Type -> Constraint) arr) :: Constraint) => HasLink (arr :> sub :: Type) | |
(KnownSymbol sym, HasLink sub) => HasLink (sym :> sub :: Type) | |
HasLink sub => HasLink (HttpVersion :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (HttpVersion :> sub) -> Link -> MkLink (HttpVersion :> sub) a # | |
HasLink sub => HasLink (BasicAuth realm a :> sub :: Type) | |
(ToHttpApiData v, HasLink sub) => HasLink (Capture' mods sym v :> sub :: Type) | |
(ToHttpApiData v, HasLink sub) => HasLink (CaptureAll sym v :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (CaptureAll sym v :> sub) -> Link -> MkLink (CaptureAll sym v :> sub) a # | |
HasLink sub => HasLink (Description s :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (Description s :> sub) -> Link -> MkLink (Description s :> sub) a # | |
HasLink sub => HasLink (Summary s :> sub :: Type) | |
HasLink sub => HasLink (AuthProtect tag :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (AuthProtect tag :> sub) -> Link -> MkLink (AuthProtect tag :> sub) a # | |
(HasLink sub, ToHttpApiData v) => HasLink (Fragment v :> sub :: Type) | |
HasLink sub => HasLink (Header' mods sym a :> sub :: Type) | |
HasLink sub => HasLink (IsSecure :> sub :: Type) | |
(KnownSymbol sym, HasLink sub) => HasLink (QueryFlag sym :> sub :: Type) | |
(KnownSymbol sym, ToHttpApiData v, HasLink sub, SBoolI (FoldRequired mods)) => HasLink (QueryParam' mods sym v :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (QueryParam' mods sym v :> sub) -> Link -> MkLink (QueryParam' mods sym v :> sub) a # | |
(KnownSymbol sym, ToHttpApiData v, HasLink sub) => HasLink (QueryParams sym v :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (QueryParams sym v :> sub) -> Link -> MkLink (QueryParams sym v :> sub) a # | |
HasLink sub => HasLink (RemoteHost :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (RemoteHost :> sub) -> Link -> MkLink (RemoteHost :> sub) a # | |
HasLink sub => HasLink (ReqBody' mods ct a :> sub :: Type) | |
HasLink sub => HasLink (StreamBody' mods framing ct a :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a0) -> Proxy (StreamBody' mods framing ct a :> sub) -> Link -> MkLink (StreamBody' mods framing ct a :> sub) a0 # | |
HasLink sub => HasLink (WithResource res :> sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (WithResource res :> sub) -> Link -> MkLink (WithResource res :> sub) a # | |
HasLink sub => HasLink (Vault :> sub :: Type) | |
(TypeError (NoInstanceForSub (HasLink :: Type -> Constraint) ty) :: Constraint) => HasLink (ty :> sub :: Type) | |
HasLink (UVerb m ct a :: Type) | |
HasLink sub => HasLink (WithNamedContext name context sub :: Type) | |
Defined in Servant.Links Methods toLink :: (Link -> a) -> Proxy (WithNamedContext name context sub) -> Link -> MkLink (WithNamedContext name context sub) a # | |
HasLink (Verb m s ct a :: Type) | |
HasLink (Stream m status fr ct a :: Type) | |
Instances
Show Link | |
ToHttpApiData Link | |
Defined in Servant.Links Methods toUrlPiece :: Link -> Text # toEncodedUrlPiece :: Link -> Builder # toHeader :: Link -> ByteString # toQueryParam :: Link -> Text # toEncodedQueryParam :: Link -> Builder # |
type family MkLink (endpoint :: k) a #
Instances
type MkLink EmptyAPI a | |
Defined in Servant.Links | |
type MkLink Raw a | |
Defined in Servant.Links | |
type MkLink RawM a | |
Defined in Servant.Links | |
type MkLink (NamedRoutes routes :: Type) a | |
Defined in Servant.Links | |
type MkLink (a :<|> b :: Type) r | |
type MkLink (NoContentVerb m :: Type) r | |
Defined in Servant.Links | |
type MkLink (arr :> sub :: Type) _1 | |
Defined in Servant.Links | |
type MkLink (sym :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (HttpVersion :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (BasicAuth realm a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (Capture' mods sym v :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (CaptureAll sym v :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Description s :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Summary s :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (AuthProtect tag :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Fragment v :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Header' mods sym a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (IsSecure :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (QueryFlag sym :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (QueryParam' mods sym v :> sub :: Type) a | |
Defined in Servant.Links type MkLink (QueryParam' mods sym v :> sub :: Type) a = If (FoldRequired mods) v (Maybe v) -> MkLink sub a | |
type MkLink (QueryParams sym v :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (RemoteHost :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (ReqBody' mods ct a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (StreamBody' mods framing ct a :> sub :: Type) r | |
Defined in Servant.Links | |
type MkLink (WithResource res :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Vault :> sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (UVerb m ct a :: Type) r | |
Defined in Servant.Links | |
type MkLink (WithNamedContext name context sub :: Type) a | |
Defined in Servant.Links | |
type MkLink (Verb m s ct a :: Type) r | |
Defined in Servant.Links | |
type MkLink (Stream m status fr ct a :: Type) r | |
Defined in Servant.Links |
safeLink :: (IsElem endpoint api, HasLink endpoint) => Proxy api -> Proxy endpoint -> MkLink endpoint Link #
class FromHttpApiData a where #
Minimal complete definition
Methods
parseUrlPiece :: Text -> Either Text a #
parseHeader :: ByteString -> Either Text a #
parseQueryParam :: Text -> Either Text a #
Instances
FromHttpApiData All | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text All # parseHeader :: ByteString -> Either Text All # parseQueryParam :: Text -> Either Text All # | |
FromHttpApiData Any | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Any # parseHeader :: ByteString -> Either Text Any # parseQueryParam :: Text -> Either Text Any # | |
FromHttpApiData Version | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Version # parseHeader :: ByteString -> Either Text Version # parseQueryParam :: Text -> Either Text Version # | |
FromHttpApiData Void | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Void # parseHeader :: ByteString -> Either Text Void # parseQueryParam :: Text -> Either Text Void # | |
FromHttpApiData Int16 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Int16 # parseHeader :: ByteString -> Either Text Int16 # parseQueryParam :: Text -> Either Text Int16 # | |
FromHttpApiData Int32 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Int32 # parseHeader :: ByteString -> Either Text Int32 # parseQueryParam :: Text -> Either Text Int32 # | |
FromHttpApiData Int64 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Int64 # parseHeader :: ByteString -> Either Text Int64 # parseQueryParam :: Text -> Either Text Int64 # | |
FromHttpApiData Int8 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Int8 # parseHeader :: ByteString -> Either Text Int8 # parseQueryParam :: Text -> Either Text Int8 # | |
FromHttpApiData Word16 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Word16 # parseHeader :: ByteString -> Either Text Word16 # parseQueryParam :: Text -> Either Text Word16 # | |
FromHttpApiData Word32 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Word32 # parseHeader :: ByteString -> Either Text Word32 # parseQueryParam :: Text -> Either Text Word32 # | |
FromHttpApiData Word64 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Word64 # parseHeader :: ByteString -> Either Text Word64 # parseQueryParam :: Text -> Either Text Word64 # | |
FromHttpApiData Word8 | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Word8 # parseHeader :: ByteString -> Either Text Word8 # parseQueryParam :: Text -> Either Text Word8 # | |
FromHttpApiData SetCookie | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text SetCookie # parseHeader :: ByteString -> Either Text SetCookie # parseQueryParam :: Text -> Either Text SetCookie # | |
FromHttpApiData Ordering | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Ordering # parseHeader :: ByteString -> Either Text Ordering # parseQueryParam :: Text -> Either Text Ordering # | |
FromHttpApiData Text | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Text # parseHeader :: ByteString -> Either Text Text # parseQueryParam :: Text -> Either Text Text # | |
FromHttpApiData Text | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Text # parseHeader :: ByteString -> Either Text Text # parseQueryParam :: Text -> Either Text Text # | |
FromHttpApiData Day | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Day # parseHeader :: ByteString -> Either Text Day # parseQueryParam :: Text -> Either Text Day # | |
FromHttpApiData Month | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Month # parseHeader :: ByteString -> Either Text Month # parseQueryParam :: Text -> Either Text Month # | |
FromHttpApiData Quarter | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Quarter # parseHeader :: ByteString -> Either Text Quarter # parseQueryParam :: Text -> Either Text Quarter # | |
FromHttpApiData QuarterOfYear | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text QuarterOfYear # parseHeader :: ByteString -> Either Text QuarterOfYear # parseQueryParam :: Text -> Either Text QuarterOfYear # | |
FromHttpApiData DayOfWeek | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text DayOfWeek # parseHeader :: ByteString -> Either Text DayOfWeek # parseQueryParam :: Text -> Either Text DayOfWeek # | |
FromHttpApiData NominalDiffTime | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text NominalDiffTime # parseHeader :: ByteString -> Either Text NominalDiffTime # parseQueryParam :: Text -> Either Text NominalDiffTime # | |
FromHttpApiData UTCTime | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text UTCTime # parseHeader :: ByteString -> Either Text UTCTime # parseQueryParam :: Text -> Either Text UTCTime # | |
FromHttpApiData LocalTime | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text LocalTime # parseHeader :: ByteString -> Either Text LocalTime # parseQueryParam :: Text -> Either Text LocalTime # | |
FromHttpApiData TimeOfDay | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text TimeOfDay # parseHeader :: ByteString -> Either Text TimeOfDay # parseQueryParam :: Text -> Either Text TimeOfDay # | |
FromHttpApiData ZonedTime | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text ZonedTime # parseHeader :: ByteString -> Either Text ZonedTime # parseQueryParam :: Text -> Either Text ZonedTime # | |
FromHttpApiData UUID | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text UUID # parseHeader :: ByteString -> Either Text UUID # parseQueryParam :: Text -> Either Text UUID # | |
FromHttpApiData String | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text String # parseHeader :: ByteString -> Either Text String # parseQueryParam :: Text -> Either Text String # | |
FromHttpApiData Integer | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Integer # parseHeader :: ByteString -> Either Text Integer # parseQueryParam :: Text -> Either Text Integer # | |
FromHttpApiData Natural | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Natural # parseHeader :: ByteString -> Either Text Natural # parseQueryParam :: Text -> Either Text Natural # | |
FromHttpApiData () | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text () # parseHeader :: ByteString -> Either Text () # parseQueryParam :: Text -> Either Text () # | |
FromHttpApiData Bool | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Bool # parseHeader :: ByteString -> Either Text Bool # parseQueryParam :: Text -> Either Text Bool # | |
FromHttpApiData Char | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Char # parseHeader :: ByteString -> Either Text Char # parseQueryParam :: Text -> Either Text Char # | |
FromHttpApiData Double | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Double # parseHeader :: ByteString -> Either Text Double # parseQueryParam :: Text -> Either Text Double # | |
FromHttpApiData Float | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Float # parseHeader :: ByteString -> Either Text Float # parseQueryParam :: Text -> Either Text Float # | |
FromHttpApiData Int | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Int # parseHeader :: ByteString -> Either Text Int # parseQueryParam :: Text -> Either Text Int # | |
FromHttpApiData Word | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text Word # parseHeader :: ByteString -> Either Text Word # parseQueryParam :: Text -> Either Text Word # | |
FromHttpApiData a => FromHttpApiData (Identity a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Identity a) # parseHeader :: ByteString -> Either Text (Identity a) # parseQueryParam :: Text -> Either Text (Identity a) # | |
FromHttpApiData a => FromHttpApiData (First a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (First a) # parseHeader :: ByteString -> Either Text (First a) # parseQueryParam :: Text -> Either Text (First a) # | |
FromHttpApiData a => FromHttpApiData (Last a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Last a) # parseHeader :: ByteString -> Either Text (Last a) # parseQueryParam :: Text -> Either Text (Last a) # | |
FromHttpApiData a => FromHttpApiData (First a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (First a) # parseHeader :: ByteString -> Either Text (First a) # parseQueryParam :: Text -> Either Text (First a) # | |
FromHttpApiData a => FromHttpApiData (Last a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Last a) # parseHeader :: ByteString -> Either Text (Last a) # parseQueryParam :: Text -> Either Text (Last a) # | |
FromHttpApiData a => FromHttpApiData (Max a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Max a) # parseHeader :: ByteString -> Either Text (Max a) # parseQueryParam :: Text -> Either Text (Max a) # | |
FromHttpApiData a => FromHttpApiData (Min a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Min a) # parseHeader :: ByteString -> Either Text (Min a) # parseQueryParam :: Text -> Either Text (Min a) # | |
FromHttpApiData a => FromHttpApiData (Dual a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Dual a) # parseHeader :: ByteString -> Either Text (Dual a) # parseQueryParam :: Text -> Either Text (Dual a) # | |
FromHttpApiData a => FromHttpApiData (Product a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Product a) # parseHeader :: ByteString -> Either Text (Product a) # parseQueryParam :: Text -> Either Text (Product a) # | |
FromHttpApiData a => FromHttpApiData (Sum a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Sum a) # parseHeader :: ByteString -> Either Text (Sum a) # parseQueryParam :: Text -> Either Text (Sum a) # | |
FromHttpApiData a => FromHttpApiData (LenientData a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (LenientData a) # parseHeader :: ByteString -> Either Text (LenientData a) # parseQueryParam :: Text -> Either Text (LenientData a) # | |
FromHttpApiData a => FromHttpApiData (Maybe a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Maybe a) # parseHeader :: ByteString -> Either Text (Maybe a) # parseQueryParam :: Text -> Either Text (Maybe a) # | |
(FromHttpApiData a, FromHttpApiData b) => FromHttpApiData (Either a b) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Either a b) # parseHeader :: ByteString -> Either Text (Either a b) # parseQueryParam :: Text -> Either Text (Either a b) # | |
HasResolution a => FromHttpApiData (Fixed a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Fixed a) # parseHeader :: ByteString -> Either Text (Fixed a) # parseQueryParam :: Text -> Either Text (Fixed a) # | |
FromHttpApiData a => FromHttpApiData (Const a b) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Const a b) # parseHeader :: ByteString -> Either Text (Const a b) # parseQueryParam :: Text -> Either Text (Const a b) # | |
FromHttpApiData a => FromHttpApiData (Tagged b a) | |
Defined in Web.Internal.HttpApiData Methods parseUrlPiece :: Text -> Either Text (Tagged b a) # parseHeader :: ByteString -> Either Text (Tagged b a) # parseQueryParam :: Text -> Either Text (Tagged b a) # |
class ToHttpApiData a where #
Minimal complete definition
Methods
toUrlPiece :: a -> Text #
toEncodedUrlPiece :: a -> Builder #
toQueryParam :: a -> Text #
toEncodedQueryParam :: a -> Builder #
Instances
ToHttpApiData All | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: All -> Text # toEncodedUrlPiece :: All -> Builder # toHeader :: All -> ByteString # toQueryParam :: All -> Text # toEncodedQueryParam :: All -> Builder # | |
ToHttpApiData Any | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Any -> Text # toEncodedUrlPiece :: Any -> Builder # toHeader :: Any -> ByteString # toQueryParam :: Any -> Text # toEncodedQueryParam :: Any -> Builder # | |
ToHttpApiData Version | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Version -> Text # toEncodedUrlPiece :: Version -> Builder # toHeader :: Version -> ByteString # toQueryParam :: Version -> Text # toEncodedQueryParam :: Version -> Builder # | |
ToHttpApiData Void | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Void -> Text # toEncodedUrlPiece :: Void -> Builder # toHeader :: Void -> ByteString # toQueryParam :: Void -> Text # toEncodedQueryParam :: Void -> Builder # | |
ToHttpApiData Int16 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Int16 -> Text # toEncodedUrlPiece :: Int16 -> Builder # toHeader :: Int16 -> ByteString # toQueryParam :: Int16 -> Text # toEncodedQueryParam :: Int16 -> Builder # | |
ToHttpApiData Int32 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Int32 -> Text # toEncodedUrlPiece :: Int32 -> Builder # toHeader :: Int32 -> ByteString # toQueryParam :: Int32 -> Text # toEncodedQueryParam :: Int32 -> Builder # | |
ToHttpApiData Int64 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Int64 -> Text # toEncodedUrlPiece :: Int64 -> Builder # toHeader :: Int64 -> ByteString # toQueryParam :: Int64 -> Text # toEncodedQueryParam :: Int64 -> Builder # | |
ToHttpApiData Int8 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Int8 -> Text # toEncodedUrlPiece :: Int8 -> Builder # toHeader :: Int8 -> ByteString # toQueryParam :: Int8 -> Text # toEncodedQueryParam :: Int8 -> Builder # | |
ToHttpApiData Word16 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Word16 -> Text # toEncodedUrlPiece :: Word16 -> Builder # toHeader :: Word16 -> ByteString # toQueryParam :: Word16 -> Text # toEncodedQueryParam :: Word16 -> Builder # | |
ToHttpApiData Word32 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Word32 -> Text # toEncodedUrlPiece :: Word32 -> Builder # toHeader :: Word32 -> ByteString # toQueryParam :: Word32 -> Text # toEncodedQueryParam :: Word32 -> Builder # | |
ToHttpApiData Word64 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Word64 -> Text # toEncodedUrlPiece :: Word64 -> Builder # toHeader :: Word64 -> ByteString # toQueryParam :: Word64 -> Text # toEncodedQueryParam :: Word64 -> Builder # | |
ToHttpApiData Word8 | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Word8 -> Text # toEncodedUrlPiece :: Word8 -> Builder # toHeader :: Word8 -> ByteString # toQueryParam :: Word8 -> Text # toEncodedQueryParam :: Word8 -> Builder # | |
ToHttpApiData SetCookie | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: SetCookie -> Text # toEncodedUrlPiece :: SetCookie -> Builder # toHeader :: SetCookie -> ByteString # toQueryParam :: SetCookie -> Text # toEncodedQueryParam :: SetCookie -> Builder # | |
ToHttpApiData Ordering | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Ordering -> Text # toEncodedUrlPiece :: Ordering -> Builder # toHeader :: Ordering -> ByteString # toQueryParam :: Ordering -> Text # toEncodedQueryParam :: Ordering -> Builder # | |
ToHttpApiData Link | |
Defined in Servant.Links Methods toUrlPiece :: Link -> Text # toEncodedUrlPiece :: Link -> Builder # toHeader :: Link -> ByteString # toQueryParam :: Link -> Text # toEncodedQueryParam :: Link -> Builder # | |
ToHttpApiData Text | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Text -> Text # toEncodedUrlPiece :: Text -> Builder # toHeader :: Text -> ByteString # toQueryParam :: Text -> Text # toEncodedQueryParam :: Text -> Builder # | |
ToHttpApiData Text | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Text -> Text # toEncodedUrlPiece :: Text -> Builder # toHeader :: Text -> ByteString # toQueryParam :: Text -> Text # toEncodedQueryParam :: Text -> Builder # | |
ToHttpApiData Day | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Day -> Text # toEncodedUrlPiece :: Day -> Builder # toHeader :: Day -> ByteString # toQueryParam :: Day -> Text # toEncodedQueryParam :: Day -> Builder # | |
ToHttpApiData Month | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Month -> Text # toEncodedUrlPiece :: Month -> Builder # toHeader :: Month -> ByteString # toQueryParam :: Month -> Text # toEncodedQueryParam :: Month -> Builder # | |
ToHttpApiData Quarter | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Quarter -> Text # toEncodedUrlPiece :: Quarter -> Builder # toHeader :: Quarter -> ByteString # toQueryParam :: Quarter -> Text # toEncodedQueryParam :: Quarter -> Builder # | |
ToHttpApiData QuarterOfYear | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: QuarterOfYear -> Text # toEncodedUrlPiece :: QuarterOfYear -> Builder # toHeader :: QuarterOfYear -> ByteString # toQueryParam :: QuarterOfYear -> Text # toEncodedQueryParam :: QuarterOfYear -> Builder # | |
ToHttpApiData DayOfWeek | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: DayOfWeek -> Text # toEncodedUrlPiece :: DayOfWeek -> Builder # toHeader :: DayOfWeek -> ByteString # toQueryParam :: DayOfWeek -> Text # toEncodedQueryParam :: DayOfWeek -> Builder # | |
ToHttpApiData NominalDiffTime | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: NominalDiffTime -> Text # toEncodedUrlPiece :: NominalDiffTime -> Builder # toHeader :: NominalDiffTime -> ByteString # toQueryParam :: NominalDiffTime -> Text # toEncodedQueryParam :: NominalDiffTime -> Builder # | |
ToHttpApiData UTCTime | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: UTCTime -> Text # toEncodedUrlPiece :: UTCTime -> Builder # toHeader :: UTCTime -> ByteString # toQueryParam :: UTCTime -> Text # toEncodedQueryParam :: UTCTime -> Builder # | |
ToHttpApiData LocalTime | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: LocalTime -> Text # toEncodedUrlPiece :: LocalTime -> Builder # toHeader :: LocalTime -> ByteString # toQueryParam :: LocalTime -> Text # toEncodedQueryParam :: LocalTime -> Builder # | |
ToHttpApiData TimeOfDay | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: TimeOfDay -> Text # toEncodedUrlPiece :: TimeOfDay -> Builder # toHeader :: TimeOfDay -> ByteString # toQueryParam :: TimeOfDay -> Text # toEncodedQueryParam :: TimeOfDay -> Builder # | |
ToHttpApiData ZonedTime | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: ZonedTime -> Text # toEncodedUrlPiece :: ZonedTime -> Builder # toHeader :: ZonedTime -> ByteString # toQueryParam :: ZonedTime -> Text # toEncodedQueryParam :: ZonedTime -> Builder # | |
ToHttpApiData UUID | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: UUID -> Text # toEncodedUrlPiece :: UUID -> Builder # toHeader :: UUID -> ByteString # toQueryParam :: UUID -> Text # toEncodedQueryParam :: UUID -> Builder # | |
ToHttpApiData String | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: String -> Text # toEncodedUrlPiece :: String -> Builder # toHeader :: String -> ByteString # toQueryParam :: String -> Text # toEncodedQueryParam :: String -> Builder # | |
ToHttpApiData Integer | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Integer -> Text # toEncodedUrlPiece :: Integer -> Builder # toHeader :: Integer -> ByteString # toQueryParam :: Integer -> Text # toEncodedQueryParam :: Integer -> Builder # | |
ToHttpApiData Natural | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Natural -> Text # toEncodedUrlPiece :: Natural -> Builder # toHeader :: Natural -> ByteString # toQueryParam :: Natural -> Text # toEncodedQueryParam :: Natural -> Builder # | |
ToHttpApiData () | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: () -> Text # toEncodedUrlPiece :: () -> Builder # toHeader :: () -> ByteString # toQueryParam :: () -> Text # toEncodedQueryParam :: () -> Builder # | |
ToHttpApiData Bool | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Bool -> Text # toEncodedUrlPiece :: Bool -> Builder # toHeader :: Bool -> ByteString # toQueryParam :: Bool -> Text # toEncodedQueryParam :: Bool -> Builder # | |
ToHttpApiData Char | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Char -> Text # toEncodedUrlPiece :: Char -> Builder # toHeader :: Char -> ByteString # toQueryParam :: Char -> Text # toEncodedQueryParam :: Char -> Builder # | |
ToHttpApiData Double | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Double -> Text # toEncodedUrlPiece :: Double -> Builder # toHeader :: Double -> ByteString # toQueryParam :: Double -> Text # toEncodedQueryParam :: Double -> Builder # | |
ToHttpApiData Float | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Float -> Text # toEncodedUrlPiece :: Float -> Builder # toHeader :: Float -> ByteString # toQueryParam :: Float -> Text # toEncodedQueryParam :: Float -> Builder # | |
ToHttpApiData Int | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Int -> Text # toEncodedUrlPiece :: Int -> Builder # toHeader :: Int -> ByteString # toQueryParam :: Int -> Text # toEncodedQueryParam :: Int -> Builder # | |
ToHttpApiData Word | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Word -> Text # toEncodedUrlPiece :: Word -> Builder # toHeader :: Word -> ByteString # toQueryParam :: Word -> Text # toEncodedQueryParam :: Word -> Builder # | |
ToHttpApiData a => ToHttpApiData (Identity a) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Identity a -> Text # toEncodedUrlPiece :: Identity a -> Builder # toHeader :: Identity a -> ByteString # toQueryParam :: Identity a -> Text # toEncodedQueryParam :: Identity a -> Builder # | |
ToHttpApiData a => ToHttpApiData (First a) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: First a -> Text # toEncodedUrlPiece :: First a -> Builder # toHeader :: First a -> ByteString # toQueryParam :: First a -> Text # toEncodedQueryParam :: First a -> Builder # | |
ToHttpApiData a => ToHttpApiData (Last a) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Last a -> Text # toEncodedUrlPiece :: Last a -> Builder # toHeader :: Last a -> ByteString # toQueryParam :: Last a -> Text # toEncodedQueryParam :: Last a -> Builder # | |
ToHttpApiData a => ToHttpApiData (First a) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: First a -> Text # toEncodedUrlPiece :: First a -> Builder # toHeader :: First a -> ByteString # toQueryParam :: First a -> Text # toEncodedQueryParam :: First a -> Builder # | |
ToHttpApiData a => ToHttpApiData (Last a) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Last a -> Text # toEncodedUrlPiece :: Last a -> Builder # toHeader :: Last a -> ByteString # toQueryParam :: Last a -> Text # toEncodedQueryParam :: Last a -> Builder # | |
ToHttpApiData a => ToHttpApiData (Max a) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Max a -> Text # toEncodedUrlPiece :: Max a -> Builder # toHeader :: Max a -> ByteString # toQueryParam :: Max a -> Text # toEncodedQueryParam :: Max a -> Builder # | |
ToHttpApiData a => ToHttpApiData (Min a) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Min a -> Text # toEncodedUrlPiece :: Min a -> Builder # toHeader :: Min a -> ByteString # toQueryParam :: Min a -> Text # toEncodedQueryParam :: Min a -> Builder # | |
ToHttpApiData a => ToHttpApiData (Dual a) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Dual a -> Text # toEncodedUrlPiece :: Dual a -> Builder # toHeader :: Dual a -> ByteString # toQueryParam :: Dual a -> Text # toEncodedQueryParam :: Dual a -> Builder # | |
ToHttpApiData a => ToHttpApiData (Product a) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Product a -> Text # toEncodedUrlPiece :: Product a -> Builder # toHeader :: Product a -> ByteString # toQueryParam :: Product a -> Text # toEncodedQueryParam :: Product a -> Builder # | |
ToHttpApiData a => ToHttpApiData (Sum a) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Sum a -> Text # toEncodedUrlPiece :: Sum a -> Builder # toHeader :: Sum a -> ByteString # toQueryParam :: Sum a -> Text # toEncodedQueryParam :: Sum a -> Builder # | |
ToHttpApiData a => ToHttpApiData (Maybe a) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Maybe a -> Text # toEncodedUrlPiece :: Maybe a -> Builder # toHeader :: Maybe a -> ByteString # toQueryParam :: Maybe a -> Text # toEncodedQueryParam :: Maybe a -> Builder # | |
(ToHttpApiData a, ToHttpApiData b) => ToHttpApiData (Either a b) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Either a b -> Text # toEncodedUrlPiece :: Either a b -> Builder # toHeader :: Either a b -> ByteString # toQueryParam :: Either a b -> Text # toEncodedQueryParam :: Either a b -> Builder # | |
HasResolution a => ToHttpApiData (Fixed a) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Fixed a -> Text # toEncodedUrlPiece :: Fixed a -> Builder # toHeader :: Fixed a -> ByteString # toQueryParam :: Fixed a -> Text # toEncodedQueryParam :: Fixed a -> Builder # | |
ToHttpApiData a => ToHttpApiData (Const a b) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Const a b -> Text # toEncodedUrlPiece :: Const a b -> Builder # toHeader :: Const a b -> ByteString # toQueryParam :: Const a b -> Text # toEncodedQueryParam :: Const a b -> Builder # | |
ToHttpApiData a => ToHttpApiData (Tagged b a) | |
Defined in Web.Internal.HttpApiData Methods toUrlPiece :: Tagged b a -> Text # toEncodedUrlPiece :: Tagged b a -> Builder # toHeader :: Tagged b a -> ByteString # toQueryParam :: Tagged b a -> Text # toEncodedQueryParam :: Tagged b a -> Builder # |
Constructors
URI | |
Fields
|
Instances
Data URI | |||||
Defined in Network.URI Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> URI -> c URI gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c URI dataTypeOf :: URI -> DataType dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c URI) dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c URI) gmapT :: (forall b. Data b => b -> b) -> URI -> URI gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> URI -> r gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> URI -> r gmapQ :: (forall d. Data d => d -> u) -> URI -> [u] gmapQi :: Int -> (forall d. Data d => d -> u) -> URI -> u gmapM :: Monad m => (forall d. Data d => d -> m d) -> URI -> m URI gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> URI -> m URI gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> URI -> m URI | |||||
Generic URI | |||||
Defined in Network.URI Associated Types
| |||||
Show URI | |||||
NFData URI | |||||
Defined in Network.URI | |||||
Eq URI | |||||
Ord URI | |||||
Lift URI | |||||
type Rep URI | |||||
Defined in Network.URI type Rep URI = D1 ('MetaData "URI" "Network.URI" "network-uri-2.6.4.2-HhmakPIsVtyLAPVmN25QSY" 'False) (C1 ('MetaCons "URI" 'PrefixI 'True) ((S1 ('MetaSel ('Just "uriScheme") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "uriAuthority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe URIAuth))) :*: (S1 ('MetaSel ('Just "uriPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: (S1 ('MetaSel ('Just "uriQuery") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "uriFragment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))) |
data SBool (b :: Bool) where #
Instances
EqP SBool | |
Defined in Data.Singletons.Bool | |
GNFData SBool | |
Defined in Data.Singletons.Bool | |
GCompare SBool | |
Defined in Data.Singletons.Bool | |
GEq SBool | |
Defined in Data.Singletons.Bool | |
GRead SBool | |
Defined in Data.Singletons.Bool Methods greadsPrec :: Int -> GReadS SBool | |
GShow SBool | |
Defined in Data.Singletons.Bool Methods gshowsPrec :: forall (a :: Bool). Int -> SBool a -> ShowS | |
OrdP SBool | |
Defined in Data.Singletons.Bool | |
Show (SBool b) | |
SBoolI b => Boring (SBool b) | |
Defined in Data.Singletons.Bool | |
NFData (SBool b) | |
Defined in Data.Singletons.Bool | |
Eq (SBool b) | |
Ord (SBool b) | |
class SBoolI (b :: Bool) where #
Instances
SBoolI 'False | |
Defined in Data.Singletons.Bool | |
SBoolI 'True | |
Defined in Data.Singletons.Bool |
module Servant.Foreign.Inflections