Documentation
¶
Index ¶
Constants ¶
const ( SourceMediaBanken = "mediabanken" SourceCloudScheduler = "cloudscheduler" )
Collection of possible sources for events
const ( TypeAssetDelivered = "asset.delivered" TypeAssetTimedMetadataDelivered = "asset.timedmetadata.delivered" TypeRefreshView = "view.refresh" TypeDirectusEvent = "directus.event" TypeSearchReindex = "search.reindex" TypeTranslationsSync = "translations.sync" TypeExportAnswersToBQ = "statistics.exportanswers" TypeImportShortsScores = "statistics.importshortsscores" )
Collection of possible event types
const ( // EventItemsCreate items.create EventItemsCreate = "items.create" // EventItemsUpdate items.update EventItemsUpdate = "items.update" // EventItemsDelete items.delete EventItemsDelete = "items.delete" )
Variables ¶
var (
// ErrErrorDuringProcessing returns a sentinel error for processing errors
ErrErrorDuringProcessing = merry.Sentinel("Error while processing event")
)
Sentinel errors
Functions ¶
This section is empty.
Types ¶
type AssetDelivered ¶
type AssetDelivered struct {
JSONMetaPath string `json:"jsonMetaPath"`
}
AssetDelivered is the event originating from MEDIABANKEN notifying the system That an update for a VOD episode is available on the storage. Note that this may trigger a creation of a new Episode as required
type Event ¶
type Event struct { Event string `json:"event"` Collection string `json:"collection"` ID string `json:"id"` }
Event represents a payload from the directus hook
type EventHandlerFunc ¶
EventHandlerFunc is a function that can process a directus event
type Handler ¶
type Handler struct { }
Handler for handling directus events
func (*Handler) On ¶
func (handler *Handler) On(events []string, callback EventHandlerFunc)
On event, do this:
type RefreshView ¶
RefreshView is an event requestig refresh of a view in the DB This is a generic event and the ViewName should be checked against a list of known views to prevent potential abuse
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service contains multiple functions for handling and publishing events