mu-rpc-0.2.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 => ToSchema f QuickstartSchema "HelloRequest" (HelloRequest f) Source # 
Instance details

Defined in Mu.Rpc.Examples

Methods

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

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

Defined in Mu.Rpc.Examples

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.2.0.0-C2MyLTc3EaTDwOPhUm0WUV" 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 => ToSchema f QuickstartSchema "HelloResponse" (HelloResponse f) Source # 
Instance details

Defined in Mu.Rpc.Examples

Methods

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

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

Defined in Mu.Rpc.Examples

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.2.0.0-C2MyLTc3EaTDwOPhUm0WUV" 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 => ToSchema f QuickstartSchema "HiRequest" (HiRequest f) Source # 
Instance details

Defined in Mu.Rpc.Examples

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

Defined in Mu.Rpc.Examples

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.2.0.0-C2MyLTc3EaTDwOPhUm0WUV" True) (C1 (MetaCons "HiRequest" PrefixI True) (S1 (MetaSel (Just "number") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (f Int))))