mu-rpc-0.1.0.0: Protocol-independent declaration of services and servers

Safe HaskellNone
LanguageHaskell2010

Mu.Rpc.Examples

Description

Look at the source code of this module.

Documentation

type QuickstartSchema = '[DRecord "HelloRequest" '[FieldDef "name" (TPrimitive Text)], DRecord "HelloResponse" '[FieldDef "message" (TPrimitive Text)], DRecord "HiRequest" '[FieldDef "number" (TPrimitive Int)]] Source #

type QuickStartService = Service "Greeter" '[Package "helloworld"] '[Method "SayHello" '[] '[ArgSingle (ViaSchema QuickstartSchema "HelloRequest")] (RetSingle (ViaSchema QuickstartSchema "HelloResponse")), Method "SayHi" '[] '[ArgSingle (ViaSchema QuickstartSchema "HiRequest")] (RetStream (ViaSchema QuickstartSchema "HelloResponse")), Method "SayManyHellos" '[] '[ArgStream (ViaSchema QuickstartSchema "HelloRequest")] (RetStream (ViaSchema QuickstartSchema "HelloResponse"))] Source #

newtype HelloRequest f Source #

Constructors

HelloRequest 

Fields

Instances
Functor f => FromSchema f QuickstartSchema "HelloRequest" (HelloRequest f) Source # 
Instance details

Defined in Mu.Rpc.Examples

Methods

fromSchema :: Term f QuickstartSchema (QuickstartSchema :/: "HelloRequest") -> HelloRequest f

Functor f => ToSchema f QuickstartSchema "HelloRequest" (HelloRequest f) Source # 
Instance details

Defined in Mu.Rpc.Examples

Methods

toSchema :: HelloRequest f -> Term f QuickstartSchema (QuickstartSchema :/: "HelloRequest")

Generic (HelloRequest f) Source # 
Instance details

Defined in Mu.Rpc.Examples

Associated Types

type Rep (HelloRequest f) :: Type -> Type #

Methods

from :: HelloRequest f -> Rep (HelloRequest f) x #

to :: Rep (HelloRequest f) x -> HelloRequest f #

type Rep (HelloRequest f) Source # 
Instance details

Defined in Mu.Rpc.Examples

type Rep (HelloRequest f) = D1 (MetaData "HelloRequest" "Mu.Rpc.Examples" "mu-rpc-0.1.0.0-inplace" True) (C1 (MetaCons "HelloRequest" PrefixI True) (S1 (MetaSel (Just "name") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (f Text))))

newtype HelloResponse f Source #

Constructors

HelloResponse 

Fields

Instances
Functor f => FromSchema f QuickstartSchema "HelloResponse" (HelloResponse f) Source # 
Instance details

Defined in Mu.Rpc.Examples

Methods

fromSchema :: Term f QuickstartSchema (QuickstartSchema :/: "HelloResponse") -> HelloResponse f

Functor f => ToSchema f QuickstartSchema "HelloResponse" (HelloResponse f) Source # 
Instance details

Defined in Mu.Rpc.Examples

Methods

toSchema :: HelloResponse f -> Term f QuickstartSchema (QuickstartSchema :/: "HelloResponse")

Generic (HelloResponse f) Source # 
Instance details

Defined in Mu.Rpc.Examples

Associated Types

type Rep (HelloResponse f) :: Type -> Type #

type Rep (HelloResponse f) Source # 
Instance details

Defined in Mu.Rpc.Examples

type Rep (HelloResponse f) = D1 (MetaData "HelloResponse" "Mu.Rpc.Examples" "mu-rpc-0.1.0.0-inplace" True) (C1 (MetaCons "HelloResponse" PrefixI True) (S1 (MetaSel (Just "message") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (f Text))))

newtype HiRequest f Source #

Constructors

HiRequest 

Fields

Instances
Functor f => FromSchema f QuickstartSchema "HiRequest" (HiRequest f) Source # 
Instance details

Defined in Mu.Rpc.Examples

Methods

fromSchema :: Term f QuickstartSchema (QuickstartSchema :/: "HiRequest") -> HiRequest f

Functor f => ToSchema f QuickstartSchema "HiRequest" (HiRequest f) Source # 
Instance details

Defined in Mu.Rpc.Examples

Methods

toSchema :: HiRequest f -> Term f QuickstartSchema (QuickstartSchema :/: "HiRequest")

Generic (HiRequest f) Source # 
Instance details

Defined in Mu.Rpc.Examples

Associated Types

type Rep (HiRequest f) :: Type -> Type #

Methods

from :: HiRequest f -> Rep (HiRequest f) x #

to :: Rep (HiRequest f) x -> HiRequest f #

type Rep (HiRequest f) Source # 
Instance details

Defined in Mu.Rpc.Examples

type Rep (HiRequest f) = D1 (MetaData "HiRequest" "Mu.Rpc.Examples" "mu-rpc-0.1.0.0-inplace" True) (C1 (MetaCons "HiRequest" PrefixI True) (S1 (MetaSel (Just "number") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (f Int))))

quickstartServer :: forall m f. (MonadServer m, Applicative f, MaybeLike f) => ServerT f QuickStartService m _ Source #