Common Lisp Package: CAVEMAN

# Caveman - main package. ## DESCRIPTION This package is main package just for convenient. Your Caveman Application may use this package. ## AUTHOR * Eitarow Fukamachi (e.arrows@gmail.com)

README:

FUNCTION

Public

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>

URL-FOR (SYMBOL &REST PARAMS)

Make an URL for the action with PARAMS. Example: @url GET "/animals/:type" (defun animals (params)) (url-for 'animals :type "cat") ;; => "/animals/cat"

Undocumented

APP-PATH (&REST PATHS)

CONFIG (&OPTIONAL KEY)

SETFCONTEXT (VAL KEY)

CURRENT-MODE

CURRENT-URI

FORWARD-TO (SYMBOL &REST PARAMS)

NEXT-ROUTE

REDIRECT-TO (URL-OR-ACTION &REST PARAMS)

MACRO

Public

URL (METHOD URL-RULE FORM)

Useful annotation to define actions. Example: ;; for Function @url GET "/login" (defun login (req) ;; response ) ;; for Clack Component @url GET "/member/:id" (defclass <member-profile> (<component>) ()) (defmethod call ((this <member-profile>) req) ;; response )

Undocumented

WITH-CONTEXT-VARIABLES ((&REST VARS) &BODY BODY)

GENERIC-FUNCTION

Private

Undocumented

LOOKUP-ROUTE (THIS SYMBOL)

REDIRECT (RES URL &OPTIONAL (STATUS))

VARIABLE

Public

*CONTEXT*

Special variable to store Caveman 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 Caveman Request, a instance of `<request>' in Caveman.Request package. Don't set to this variable directly. This is designed to be bound in lexical let.

*RESPONSE*

Special variable to store Caveman Response, a instance of `<response>' in Caveman.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.

Private

*PROJECT*

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