coleslaw/src/posts.lisp
Brit Butler e81f01440d API changes, Static Indices rewrite and more...
* Revamp API intersection of indices and posts.
* Rewrite the static implementation of indices.
* Add split-sequence dep to coleslaw-static
* Various bugfixes and cleanups to import plugin.
* Beginnings of hunchentoot plugin.
* Update TODO.
2011-04-22 18:37:22 -04:00

34 lines
1.1 KiB
Common Lisp

(in-package :coleslaw)
(defclass post ()
((id :initform nil :initarg :id
:accessor post-id)
(title :initform nil :initarg :title
:accessor post-title)
(tags :initform nil :initarg :tags
:accessor post-tags)
(date :initform nil :initarg :date
:accessor post-date)
(content :initform nil :initarg :content
:accessor post-content)
(aliases :initform nil :initarg :aliases
:accessor post-aliases)))
(defgeneric make-post (title tags date content
&key id aliases &allow-other-keys)
(:documentation "Create a POST with the given data."))
(defgeneric add-post (post id)
(:documentation "Insert a post into *storage* with the given ID."))
(defgeneric remove-post (id)
(:documentation "Remove a post from *storage* matching ID."))
(defgeneric render-post (id)
(:documentation "Generate the final HTML for the post with given ID."))
(defgeneric find-post (id)
(:documentation "Retrieve a post from *storage* matching ID."))
(defgeneric post-url (id)
(:documentation "Return the URL for the post with the given ID."))