greskell-websocket-0.1.2.2: Haskell client for Gremlin Server using WebSocket serializer

MaintainerToshio Ito <debug.ito@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Network.Greskell.WebSocket.Response

Contents

Description

 
Synopsis

ResponseMessage

data ResponseMessage s Source #

ResponseMessage object from Gremlin Server. See http://tinkerpop.apache.org/docs/current/dev/provider/.

Type s is the type of the response data.

Instances
Functor ResponseMessage Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Methods

fmap :: (a -> b) -> ResponseMessage a -> ResponseMessage b #

(<$) :: a -> ResponseMessage b -> ResponseMessage a #

Eq s => Eq (ResponseMessage s) Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Show s => Show (ResponseMessage s) Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Generic (ResponseMessage s) Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Associated Types

type Rep (ResponseMessage s) :: Type -> Type #

FromGraphSON s => FromJSON (ResponseMessage s) Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

FromGraphSON s => FromGraphSON (ResponseMessage s) Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

type Rep (ResponseMessage s) Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

type Rep (ResponseMessage s) = D1 (MetaData "ResponseMessage" "Network.Greskell.WebSocket.Response" "greskell-websocket-0.1.2.2-7uXdRri4Dr9r98dweIEu4" False) (C1 (MetaCons "ResponseMessage" PrefixI True) (S1 (MetaSel (Just "requestId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 UUID) :*: (S1 (MetaSel (Just "status") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ResponseStatus) :*: S1 (MetaSel (Just "result") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (ResponseResult s)))))

ResponseStatus

data ResponseStatus Source #

"status" field.

Constructors

ResponseStatus 
Instances
Eq ResponseStatus Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Show ResponseStatus Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Generic ResponseStatus Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Associated Types

type Rep ResponseStatus :: Type -> Type #

FromJSON ResponseStatus Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

FromGraphSON ResponseStatus Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

type Rep ResponseStatus Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

type Rep ResponseStatus = D1 (MetaData "ResponseStatus" "Network.Greskell.WebSocket.Response" "greskell-websocket-0.1.2.2-7uXdRri4Dr9r98dweIEu4" False) (C1 (MetaCons "ResponseStatus" PrefixI True) (S1 (MetaSel (Just "code") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ResponseCode) :*: (S1 (MetaSel (Just "message") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text) :*: S1 (MetaSel (Just "attributes") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Object))))

ResponseResult

data ResponseResult s Source #

"result" field.

Constructors

ResponseResult 

Fields

Instances
Functor ResponseResult Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Methods

fmap :: (a -> b) -> ResponseResult a -> ResponseResult b #

(<$) :: a -> ResponseResult b -> ResponseResult a #

Eq s => Eq (ResponseResult s) Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Show s => Show (ResponseResult s) Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Generic (ResponseResult s) Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Associated Types

type Rep (ResponseResult s) :: Type -> Type #

FromGraphSON s => FromJSON (ResponseResult s) Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

FromGraphSON s => FromGraphSON (ResponseResult s) Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

type Rep (ResponseResult s) Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

type Rep (ResponseResult s) = D1 (MetaData "ResponseResult" "Network.Greskell.WebSocket.Response" "greskell-websocket-0.1.2.2-7uXdRri4Dr9r98dweIEu4" False) (C1 (MetaCons "ResponseResult" PrefixI True) (S1 (MetaSel (Just "resultData") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 s) :*: S1 (MetaSel (Just "meta") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Object)))

ResponseCode

data ResponseCode Source #

Response status code

Instances
Bounded ResponseCode Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Enum ResponseCode Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Eq ResponseCode Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Ord ResponseCode Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

Show ResponseCode Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

ToJSON ResponseCode Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

FromJSON ResponseCode Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

FromGraphSON ResponseCode Source # 
Instance details

Defined in Network.Greskell.WebSocket.Response

isTerminating :: ResponseCode -> Bool Source #

Returns True if the ResponseCode is a terminating code.

isSuccess :: ResponseCode -> Bool Source #

Returns True if the ResponseCode is a success.

>>> isSuccess Success
True
>>> isSuccess Unauthorized
False
>>> isSuccess ServerError
False

isClientSideError :: ResponseCode -> Bool Source #

Returns True if the ResponseCode is a client-side failure.

>>> isClientSideError Success
False
>>> isClientSideError Unauthorized
True
>>> isClientSideError ServerError
False

isServerSideError :: ResponseCode -> Bool Source #

Returns True if the ResponseCode is a server-side failure.

>>> isServerSideError Success
False
>>> isServerSideError Unauthorized
False
>>> isServerSideError ServerError
True