Documentation ¶
Index ¶
- Constants
- Variables
- func Boot()
- type Event
- func DeleteComment(sign UserSign, postId, id bson.ObjectId) Event
- func DeletePost(sign UserSign, id bson.ObjectId) Event
- func NewBanFlag(userID bson.ObjectId) Event
- func NewFlag(id bson.ObjectId) Event
- func PostComment(id bson.ObjectId) Event
- func PostNew(id bson.ObjectId) Event
- func PostView(sign UserSign, id bson.ObjectId) Event
- func PostsReached(sign UserSign, list []bson.ObjectId) Event
- func RawEmit(channel, event string, params map[string]interface{}) Event
- func TrackActivity(m model.Activity) Event
- func TrackMention(userID, relatedID bson.ObjectId, related string, usersID []bson.ObjectId) Event
- func UpdateComment(sign UserSign, postId, id bson.ObjectId) Event
- func Vote(vote votes.Vote) Event
- type EventHandler
- type Handler
- type UserSign
Constants ¶
View Source
const ( POSTS_NEW = "posts:new" POSTS_COMMENT = "posts:comment" POST_VIEW = "posts:view" POSTS_REACHED = "posts:reached" POST_DELETED = "posts:deleted" RECENT_ACTIVITY = "activity:recent" COMMENT_DELETE = "comments:delete" COMMENT_UPDATE = "comments:update" COMMENT_UPVOTE = "comments:upvote" COMMENT_VOTE = "comments:vote" VOTE = "vote" COMMENT_UPVOTE_REMOVE = "comments:upvote.remove" COMMENT_DOWNVOTE = "comments:downvote" COMMENT_DOWNVOTE_REMOVE = "comments:downvote.remove" NEW_FLAG = "flag:new" NEW_BAN = "flag:ban" NEW_MENTION = "new:mentions" RAW_EMIT = "transmit:emit" )
Variables ¶
View Source
var ( // In -put channel for incoming events. In chan Event // On "event" channel. Register event handlers using channels. On chan EventHandler )
View Source
var Handlers map[string][]Handler
Map of handlers that will react to events.
Functions ¶
Types ¶
type EventHandler ¶
Click to show internal directories.
Click to hide internal directories.