Added support for hooks to customize behavior.

This commit is contained in:
Travis Reeder
2016-08-09 22:34:28 -07:00
parent 72a6d3aa5b
commit 8558d13f07
23 changed files with 324 additions and 42 deletions

13
api/ifaces/listeners.go Normal file
View File

@@ -0,0 +1,13 @@
package ifaces
import (
"github.com/iron-io/functions/api/models"
"golang.org/x/net/context"
)
type AppListener interface {
// BeforeAppUpdate called right before storing App in the database
BeforeAppUpdate(ctx context.Context, app *models.App) error
// AfterAppUpdate called after storing App in the database
AfterAppUpdate(ctx context.Context, app *models.App) error
}