Documentation ¶
Overview ¶
Package hander handles reactions. A reaction is basically a series of actions trigerred by an event.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddReaction ¶
func AddReaction(reaction Reaction)
AddReaction adds a reaction to the local map of reactions.
func HandleEvents ¶
func HandleEvents(ch chan eventsources.EventData)
HandleEvents wait for events and calls handleEvent in a goroutine for each event.
func RemoveReaction ¶
RemoveReaction removes a reaction from the local map of reactions.
Types ¶
type Action ¶
type Action struct { Script string `json:"script"` // JS code Action string `json:"action"` // Name of the action Module string `json:"module"` // Name of the module containing the action }
Action represents an action. It contains the JavaScript code to execute after the action, the name of the action and the name of the action module containing the action.
Click to show internal directories.
Click to hide internal directories.