Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DatabaseEvent ¶
type DatabaseEvent struct {
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
EventID string
CorrelationID string `gorm:"index"`
Timestamp time.Time `gorm:"index"`
SourceName string `gorm:"index"`
SourceID string `gorm:"index"`
TypeName string `gorm:"index"`
Data pgtype.JSONB `gorm:"type:jsonb"`
IsHandled bool `gorm:"index"`
HandledByName string `gorm:"index"`
HandledByID string `gorm:"index"`
}
func (*DatabaseEvent) TableName ¶
func (d *DatabaseEvent) TableName() string
type Event ¶
type Event struct {
EventID ksuid.KSUID `json:"event_id"`
CorrelationID ksuid.KSUID `json:"correlation_id"`
Timestamp time.Time `json:"timestamp"`
SourceName string `json:"source_name"`
SourceID ksuid.KSUID `json:"source_uuid"`
TypeName string `json:"type_name"`
Data json.RawMessage `json:"data"`
}
func NewWithCorrelation ¶
func NewWithoutCorrelation ¶
func NewWithoutCorrelation(typeName string, data json.RawMessage) *Event
func (*Event) ToConsumedDatabaseEvent ¶
func (e *Event) ToConsumedDatabaseEvent() (*DatabaseEvent, error)
func (*Event) ToDatabaseEvent ¶
func (e *Event) ToDatabaseEvent() (*DatabaseEvent, error)
Click to show internal directories.
Click to hide internal directories.