mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Added support for hooks to customize behavior.
This commit is contained in:
13
api/ifaces/listeners.go
Normal file
13
api/ifaces/listeners.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user