memcache-0.3.0.2: A memcached client library.
Copyright(c) David Terei 2016
LicenseBSD
Maintainercode@davidterei.com
Stabilitystable
PortabilityGHC
Safe HaskellSafe-Inferred
LanguageHaskell2010

Database.Memcache.Types

Description

Stores the various types needed by Memcached. Mostly concerned with the representation of the protocol.

Synopsis

SASL Authentication

data Authentication Source #

SASL Authentication information for a server.

Constructors

Auth 
NoAuth 

type Username = ByteString Source #

Username for authentication.

type Password = ByteString Source #

Password for authentication.

Fields & Values

data Q Source #

Constructors

Loud 
Quiet 

Instances

Instances details
Show Q Source # 
Instance details

Defined in Database.Memcache.Types

Methods

showsPrec :: Int -> Q -> ShowS #

show :: Q -> String #

showList :: [Q] -> ShowS #

Eq Q Source # 
Instance details

Defined in Database.Memcache.Types

Methods

(==) :: Q -> Q -> Bool #

(/=) :: Q -> Q -> Bool #

data K Source #

Constructors

NoKey 
IncludeKey 

Instances

Instances details
Show K Source # 
Instance details

Defined in Database.Memcache.Types

Methods

showsPrec :: Int -> K -> ShowS #

show :: K -> String #

showList :: [K] -> ShowS #

Eq K Source # 
Instance details

Defined in Database.Memcache.Types

Methods

(==) :: K -> K -> Bool #

(/=) :: K -> K -> Bool #

data Status Source #

The status (success or error) of a Memcached operation returned in a Response.

Constructors

NoError

Operation successful.

ErrKeyNotFound

Key not found.

ErrKeyExists

Key exists when not expected.

ErrValueTooLarge

Value too large to store at server.

ErrInvalidArgs

Invalid arguments for operation.

ErrItemNotStored

Key-Value pair not stored at server (internal error).

ErrValueNonNumeric

Value not numeric when increment or decrement requested.

ErrUnknownCommand

Server doesn't know requested command.

ErrOutOfMemory

Server out of memory.

SaslAuthFail

SASL authentication failed.

SaslAuthContinue

SASL authentication requires more steps.

Instances

Instances details
Show Status Source # 
Instance details

Defined in Database.Memcache.Types

Eq Status Source # 
Instance details

Defined in Database.Memcache.Types

Methods

(==) :: Status -> Status -> Bool #

(/=) :: Status -> Status -> Bool #

Header

data Header Source #

Memcached packet header (for both Request and Response).

Constructors

Header 

Instances

Instances details
Show Header Source # 
Instance details

Defined in Database.Memcache.Types

Eq Header Source # 
Instance details

Defined in Database.Memcache.Types

Methods

(==) :: Header -> Header -> Bool #

(/=) :: Header -> Header -> Bool #

data PktType Source #

Constructors

PktRequest 
PktResponse 

Instances

Instances details
Show PktType Source # 
Instance details

Defined in Database.Memcache.Types

Eq PktType Source # 
Instance details

Defined in Database.Memcache.Types

Methods

(==) :: PktType -> PktType -> Bool #

(/=) :: PktType -> PktType -> Bool #

Requests

data Request Source #

Constructors

Req 

Instances

Instances details
Show Request Source # 
Instance details

Defined in Database.Memcache.Types

Eq Request Source # 
Instance details

Defined in Database.Memcache.Types

Methods

(==) :: Request -> Request -> Bool #

(/=) :: Request -> Request -> Bool #

data OpRequest Source #

Constructors

ReqGet Q K Key 
ReqSet Q Key Value SESet 
ReqAdd Q Key Value SESet 
ReqReplace Q Key Value SESet 
ReqDelete Q Key 
ReqIncrement Q Key SEIncr 
ReqDecrement Q Key SEIncr 
ReqAppend Q Key Value 
ReqPrepend Q Key Value 
ReqTouch Key SETouch 
ReqGAT Q K Key SETouch 
ReqFlush Q (Maybe SETouch) 
ReqNoop 
ReqVersion 
ReqStat (Maybe Key) 
ReqQuit Q 
ReqSASLList 
ReqSASLStart Key Value 
ReqSASLStep Key Value 
ReqRaw Word8 (Maybe Key) (Maybe Value) SERaw

Warning: This is dangerous; no future compatability guaranteed

Raw request is custom requests, dangerous as no corresponding raw response...

Instances

Instances details
Show OpRequest Source # 
Instance details

Defined in Database.Memcache.Types

Eq OpRequest Source # 
Instance details

Defined in Database.Memcache.Types

data SESet Source #

Constructors

SESet Flags Expiration 

Instances

Instances details
Show SESet Source # 
Instance details

Defined in Database.Memcache.Types

Methods

showsPrec :: Int -> SESet -> ShowS #

show :: SESet -> String #

showList :: [SESet] -> ShowS #

Eq SESet Source # 
Instance details

Defined in Database.Memcache.Types

Methods

(==) :: SESet -> SESet -> Bool #

(/=) :: SESet -> SESet -> Bool #

data SEIncr Source #

Instances

Instances details
Show SEIncr Source # 
Instance details

Defined in Database.Memcache.Types

Eq SEIncr Source # 
Instance details

Defined in Database.Memcache.Types

Methods

(==) :: SEIncr -> SEIncr -> Bool #

(/=) :: SEIncr -> SEIncr -> Bool #

data SETouch Source #

Constructors

SETouch Expiration 

Instances

Instances details
Show SETouch Source # 
Instance details

Defined in Database.Memcache.Types

Eq SETouch Source # 
Instance details

Defined in Database.Memcache.Types

Methods

(==) :: SETouch -> SETouch -> Bool #

(/=) :: SETouch -> SETouch -> Bool #

data SERaw Source #

Constructors

SERaw Builder Int 

Instances

Instances details
Show SERaw Source # 
Instance details

Defined in Database.Memcache.Types

Methods

showsPrec :: Int -> SERaw -> ShowS #

show :: SERaw -> String #

showList :: [SERaw] -> ShowS #

Eq SERaw Source # 
Instance details

Defined in Database.Memcache.Types

Methods

(==) :: SERaw -> SERaw -> Bool #

(/=) :: SERaw -> SERaw -> Bool #

emptyReq :: Request Source #

Noop request.

Responses

data Response Source #

Memcached response packet.

Constructors

Res 

Instances

Instances details
Show Response Source # 
Instance details

Defined in Database.Memcache.Types

Eq Response Source # 
Instance details

Defined in Database.Memcache.Types

emptyRes :: Response Source #

Noop response.