github.com/billybanfield/evergreen@v0.0.0-20170525200750-eeee692790f7/notify/notification_handler.go (about) 1 package notify 2 3 import ( 4 "github.com/evergreen-ci/evergreen/web" 5 ) 6 7 // General interface for how notify.go deals with a given type of notification. 8 // At a high level, structs that implement this interface are responsible for 9 // scanning the database to find which notifications to generate and returning 10 // an object matching the Email interface for each notification. 11 type NotificationHandler interface { 12 // Given a key, scan through database and generate the notifications that 13 // have been triggered since the last time this function ran. Returns the 14 // emails generated for this particular key. 15 GetNotifications(ae *web.App, key *NotificationKey) ([]Email, error) 16 }