diff options
Diffstat (limited to 'lazybones.lisp')
-rw-r--r-- | lazybones.lisp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lazybones.lisp b/lazybones.lisp index 5bdd7e6..d15af33 100644 --- a/lazybones.lisp +++ b/lazybones.lisp @@ -105,7 +105,11 @@ :documentation "Default content type sent back to clients.") (endpoints :accessor app-endpoints - :initform nil))) + :initform nil) + (dict + :accessor app-dict + :initform (make-hash-table :test 'equal) + :documentation "A hash table for storing arbitrary informatrion on this application."))) (defun expand-provision-app-option (app option value) (list 'setf @@ -144,6 +148,14 @@ supplied, get the default app. Every package has at most one default app, named with the package name. If no app can be found, return NIL" (symbol-lazybones (or name (default-app-name)) nil)) +(defun app-dict (key &optional name) + "Get value from the application dict" + (gethash key (app-dict (app name)))) + +(defun (setf app-dict) (new key &optional name) + "Set a value in the application dict." + (setf (gethash key (app-dict (app name))) new)) + (defclass endpoint () ((method :reader endpoint-method |