Documentation ¶
Overview ¶
Package events represents a stub for producing events to a Kafka topic, a real implementation would contain logic for retrying failed events etc
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventType ¶
type EventType string
EventType represents the type of event that occurred.
const ( // EventTypeUserCreated is triggered after a user has been successfully created. EventTypeUserCreated EventType = "user_created" // EventTypeUserUpdated is triggered after a user has been successfully updated. EventTypeUserUpdated EventType = "user_updated" // EventTypeUserDeleted is triggered after a user has been successfully deleted. EventTypeUserDeleted EventType = "user_deleted" EventTypeQuestCreated EventType = "quest_created" EventTypeQuestUpdated EventType = "quest_updated" EventTypeQuestDeleted EventType = "quest_deleted" EventTypeQuestSent EventType = "quest_sent" )
type MediaEvent ¶
type MediaEvent struct { EventType EventType `json:"event_type"` ID string `json:"id"` MediaRecord *model.MediaRecord `json:"media_record"` }
type QuestEvent ¶
type QuestEvent struct { EventType EventType `json:"event_type"` ID string `json:"id"` Quest *questModel.QuestWithSteps `json:"quest"` }
Click to show internal directories.
Click to hide internal directories.