Module
Sparrow.Types
- Package
- purescript-sparrow
- Repository
- athanclark/purescript-sparrow
This module defines the data types used by the protocol over the wire, and the definition of
a user-level "client" that can handle a fully specified initIn
, initOut
, deltaIn
and deltaOut
transmission schema for a topic. Generally this module should be considered "internal".
#ClientReturn Source
type ClientReturn initOut deltaIn = { initOut :: initOut, sendCurrent :: deltaIn -> Effect Unit, unsubscribe :: Effect Unit }
#ClientArgs Source
type ClientArgs initIn initOut deltaIn deltaOut = { initIn :: initIn, onReject :: Effect Unit, receive :: ClientReturn initOut deltaIn -> deltaOut -> Effect Unit }
#topicToPath Source
topicToPath :: Topic -> Path
#WithSessionID Source
newtype WithSessionID a
Constructors
WithSessionID { content :: a, sessionID :: SessionID }
Instances
(Generic a b) => Generic (WithSessionID a) _
(Eq a, Generic a b) => Eq (WithSessionID a)
(Show a, Generic a b) => Show (WithSessionID a)
(EncodeJson a) => EncodeJson (WithSessionID a)
(DecodeJson a) => DecodeJson (WithSessionID a)
#InitResponse Source
data InitResponse a
Constructors
Instances
(Generic a b) => Generic (InitResponse a) _
(Eq a, Generic a b) => Eq (InitResponse a)
(Show a, Generic a b) => Show (InitResponse a)
(EncodeJson a) => EncodeJson (InitResponse a)
(DecodeJson a) => DecodeJson (InitResponse a)
#WithTopic Source
newtype WithTopic a
Constructors
Instances
(Generic a b) => Generic (WithTopic a) _
(Eq a, Generic a b) => Eq (WithTopic a)
(Show a, Generic a b) => Show (WithTopic a)
(EncodeJson a) => EncodeJson (WithTopic a)
(DecodeJson a) => DecodeJson (WithTopic a)
#WSHTTPResponse Source
#WSIncoming Source
data WSIncoming a
Constructors
Instances
(Generic a b) => Generic (WSIncoming a) _
(Eq a, Generic a b) => Eq (WSIncoming a)
(Show a, Generic a b) => Show (WSIncoming a)
(EncodeJson a) => EncodeJson (WSIncoming a)
(DecodeJson a) => DecodeJson (WSIncoming a)
#WSOutgoing Source
data WSOutgoing a
Constructors
WSTopicsSubscribed (Array Topic)
WSTopicAdded Topic
WSTopicRemoved Topic
WSTopicRejected Topic
WSDecodingError String
WSOutgoing a
Instances
(Generic a b) => Generic (WSOutgoing a) _
(Eq a, Generic a b) => Eq (WSOutgoing a)
(Show a, Generic a b) => Show (WSOutgoing a)
(EncodeJson a) => EncodeJson (WSOutgoing a)
(DecodeJson a) => DecodeJson (WSOutgoing a)