Portability | unportable |
---|---|
Stability | unstable |
Maintainer | pbrisbin@gmail.com |
Safe Haskell | None |
- class YesodAuthPersist m => YesodComments m where
- commentStorage :: CommentStorage s m
- userDetails :: AuthId m -> HandlerT m IO (Maybe UserDetails)
- threadRoute :: ThreadId -> Route m
- editRoute :: Maybe (ThreadId -> CommentId -> Route m)
- deleteRoute :: Maybe (ThreadId -> CommentId -> Route m)
- type CommentId = Int
- type ThreadId = Text
- data Comment = Comment {}
- data UserDetails = UserDetails {
- textUserId :: Text
- friendlyName :: Text
- emailAddress :: Text
- data CommentStorage s m = CommentStorage {}
Documentation
class YesodAuthPersist m => YesodComments m whereSource
commentStorage :: CommentStorage s mSource
How to store and load comments from persistent storage.
userDetails :: AuthId m -> HandlerT m IO (Maybe UserDetails)Source
If Nothing
is returned, the user cannot add a comment. This can
be used to blacklist users. Note that comments left by them will
still appear until manually deleted.
threadRoute :: ThreadId -> Route mSource
A thread's route. Currently, only used for linking back from the admin subsite.
editRoute :: Maybe (ThreadId -> CommentId -> Route m)Source
A route to the admin subsite's EditCommentR action. If Nothing
,
the Edit link will not be shown.
deleteRoute :: Maybe (ThreadId -> CommentId -> Route m)Source
A route to the admin subsite's DeleteCommentR action. If
Nothing
, the Delete link will not be shown.
The core data type, a Comment
data UserDetails Source
Information about the User needed to store comments.
UserDetails | |
|
data CommentStorage s m Source
How to save and restore comments from persistent storage. All
necessary actions are accomplished through these 5 functions.
Currently, only persistStorage
is available.