{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE PolyKinds #-}
module Servant.API.ServerSentEvents
( ServerSentEvents'
, ServerSentEvents
, EventKind (..)
)
where
import Data.Kind (Type)
import Data.Typeable (Typeable)
import GHC.Generics (Generic)
import GHC.TypeLits (Nat)
import Network.HTTP.Types (StdMethod (GET))
data EventKind
= RawEvent
| JsonEvent
data ServerSentEvents' (method :: k) (status :: Nat) (kind :: EventKind) (a :: Type)
deriving (Typeable, (forall x.
ServerSentEvents' method status kind a
-> Rep (ServerSentEvents' method status kind a) x)
-> (forall x.
Rep (ServerSentEvents' method status kind a) x
-> ServerSentEvents' method status kind a)
-> Generic (ServerSentEvents' method status kind a)
forall x.
Rep (ServerSentEvents' method status kind a) x
-> ServerSentEvents' method status kind a
forall x.
ServerSentEvents' method status kind a
-> Rep (ServerSentEvents' method status kind a) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall k (method :: k) (status :: Nat) (kind :: EventKind) a x.
Rep (ServerSentEvents' method status kind a) x
-> ServerSentEvents' method status kind a
forall k (method :: k) (status :: Nat) (kind :: EventKind) a x.
ServerSentEvents' method status kind a
-> Rep (ServerSentEvents' method status kind a) x
$cfrom :: forall k (method :: k) (status :: Nat) (kind :: EventKind) a x.
ServerSentEvents' method status kind a
-> Rep (ServerSentEvents' method status kind a) x
from :: forall x.
ServerSentEvents' method status kind a
-> Rep (ServerSentEvents' method status kind a) x
$cto :: forall k (method :: k) (status :: Nat) (kind :: EventKind) a x.
Rep (ServerSentEvents' method status kind a) x
-> ServerSentEvents' method status kind a
to :: forall x.
Rep (ServerSentEvents' method status kind a) x
-> ServerSentEvents' method status kind a
Generic)
type ServerSentEvents = ServerSentEvents' 'GET 200