Common Lisp Package: NINGLE.MIDDLEWARE.CONTEXT

# Ningle.Middleware.Context - Clack Middleware to set context for each request. ## DESCRIPTION This is a Clack Middleware to ensure context is set for each request. ## AUTHOR * Eitarow Fukamachi (e.arrows@gmail.com) ## SEE ALSO * Ningle.Context

README:

FUNCTION

Private

CONTEXT (&OPTIONAL KEY)

Access to current context. If key is specified, return the value in current context. If not, just return a current context. Example: (context) ;=> #<HASH-TABLE :TEST EQL size 0/60 #x3020025FF5FD> (context :request) ;=> #<CAVEMAN.REQUEST:<REQUEST> #x3020024FCCFD>

MAKE-CONTEXT (REQ)

Create a new Context.

MAKE-RESPONSE (&OPTIONAL STATUS HEADERS BODY)

A synonym for (make-instance '<response> ...). Create a <response> instance.

Undocumented

SETFCONTEXT (VAL KEY)

GENERIC-FUNCTION

Private

Undocumented

SETFBODY (VALUE RES)

FINALIZE (RES)

SLOT-ACCESSOR

Private

Undocumented

BODY (OBJECT)

VARIABLE

Private

*CONTEXT*

Special variable to store Ningle Context, a hash table. Don't set to this variable directly. This is designed to be bound in lexical let.

*REQUEST*

Special variable to store Ningle Request, a instance of `<request>' in Ningle.Request package. Don't set to this variable directly. This is designed to be bound in lexical let.

*RESPONSE*

Special variable to store Ningle Response, a instance of `<response>' in Ningle.Response package. Don't set to this variable directly. This is designed to be bound in lexical let.

*SESSION*

Special variable to store session. Don't set to this variable directly. This is designed to be bound in lexical let.

CLASS

Public

<NINGLE-MIDDLEWARE-CONTEXT>

Clack Middleware to set context for each request.