Skip to content

Commit

Permalink
Add comments to Plugin interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
robfig committed Nov 11, 2012
1 parent 797b033 commit 0ce48eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@ package rev

// An plugin that allows the user to inject behavior at various points in the request cycle.
type Plugin interface {
// Called on server startup (and on each code reload).
OnAppStart()
// Called after the router has finished configuration.
OnRoutesLoaded(router *Router)
// Called before every request.
BeforeRequest(c *Controller)
// Called after every request (except on panics).
AfterRequest(c *Controller)
// Called when a panic exits an action, with the recovered value.
OnException(c *Controller, err interface{})
}

Expand Down

0 comments on commit 0ce48eb

Please sign in to comment.