memcache-0.3.0.1: A memcached client library.
Copyright(c) David Terei 2016
LicenseBSD
Maintainercode@davidterei.com
Stabilitystable
PortabilityGHC
Safe HaskellNone
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
Eq Q Source # 
Instance details

Defined in Database.Memcache.Types

Methods

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

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

Show Q Source # 
Instance details

Defined in Database.Memcache.Types

Methods

showsPrec :: Int -> Q -> ShowS #

show :: Q -> String #

showList :: [Q] -> ShowS #

data K Source #

Constructors

NoKey 
IncludeKey 

Instances

Instances details
Eq K Source # 
Instance details

Defined in Database.Memcache.Types

Methods

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

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

Show K Source # 
Instance details

Defined in Database.Memcache.Types

Methods

showsPrec :: Int -> K -> ShowS #

show :: K -> String #

showList :: [K] -> ShowS #

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
Eq Status Source # 
Instance details

Defined in Database.Memcache.Types

Methods

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

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

Show Status Source # 
Instance details

Defined in Database.Memcache.Types

Header

data Header Source #

Memcached packet header (for both Request and Response).

Constructors

Header 

Instances

Instances details
Eq Header Source # 
Instance details

Defined in Database.Memcache.Types

Methods

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

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

Show Header Source # 
Instance details

Defined in Database.Memcache.Types

data PktType Source #

Constructors

PktRequest 
PktResponse 

Instances

Instances details
Eq PktType Source # 
Instance details

Defined in Database.Memcache.Types

Methods

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

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

Show PktType Source # 
Instance details

Defined in Database.Memcache.Types

Requests

data Request Source #

Constructors

Req 

Instances

Instances details
Eq Request Source # 
Instance details

Defined in Database.Memcache.Types

Methods

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

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

Show Request Source # 
Instance details

Defined in Database.Memcache.Types

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
Eq OpRequest Source # 
Instance details

Defined in Database.Memcache.Types

Show OpRequest Source # 
Instance details

Defined in Database.Memcache.Types

data SESet Source #

Constructors

SESet Flags Expiration 

Instances

Instances details
Eq SESet Source # 
Instance details

Defined in Database.Memcache.Types

Methods

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

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

Show SESet Source # 
Instance details

Defined in Database.Memcache.Types

Methods

showsPrec :: Int -> SESet -> ShowS #

show :: SESet -> String #

showList :: [SESet] -> ShowS #

data SEIncr Source #

Instances

Instances details
Eq SEIncr Source # 
Instance details

Defined in Database.Memcache.Types

Methods

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

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

Show SEIncr Source # 
Instance details

Defined in Database.Memcache.Types

data SETouch Source #

Constructors

SETouch Expiration 

Instances

Instances details
Eq SETouch Source # 
Instance details

Defined in Database.Memcache.Types

Methods

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

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

Show SETouch Source # 
Instance details

Defined in Database.Memcache.Types

data SERaw Source #

Constructors

SERaw Builder Int 

Instances

Instances details
Eq SERaw Source # 
Instance details

Defined in Database.Memcache.Types

Methods

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

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

Show SERaw Source # 
Instance details

Defined in Database.Memcache.Types

Methods

showsPrec :: Int -> SERaw -> ShowS #

show :: SERaw -> String #

showList :: [SERaw] -> ShowS #

emptyReq :: Request Source #

Noop request.

Responses

data Response Source #

Memcached response packet.

Constructors

Res 

Instances

Instances details
Eq Response Source # 
Instance details

Defined in Database.Memcache.Types

Show Response Source # 
Instance details

Defined in Database.Memcache.Types

emptyRes :: Response Source #

Noop response.