Documentation ¶
Index ¶
- type EventEntity
- type Eventsam
- func (es *Eventsam) FetchAggregateEvent(aggregateName string, afterID, limit int) (events []EventEntity, err error)
- func (es *Eventsam) FetchAggregatesEvent(aggregateNames []string, afterID, limit int) (events []EventEntity, err error)
- func (es *Eventsam) FetchAllEvent(afterID, limit int) (events []EventEntity, err error)
- func (es *Eventsam) Retrieve(aggregateID string, aggregateName string, afterVersion int) (events []EventEntity, err error)
- func (es *Eventsam) SetPublisher(id string, publisher Publisher)
- func (es Eventsam) Store(aggregateID string, aggregateName string, eventName string, version int64, ...) (entity EventEntity, err error)
- type Publisher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventEntity ¶
type EventEntity struct { ID uint `gorm:"primarykey" json:"id"` EventID string `gorm:"type:varchar(191)" json:"event_id"` AggregateName string `gorm:"type:varchar(191);index:,unique,composite:idx_aggregate_version;index" json:"aggregate_name"` AggregateID string `gorm:"type:varchar(191);index:,unique,composite:idx_aggregate_version;index" json:"aggregate_id"` EventName string `gorm:"type:varchar(191)" json:"event_name"` Version int64 `gorm:"index:,unique,composite:idx_aggregate_version;index" json:"version"` Data string `json:"data"` TimeMillis int64 `json:"time_millis"` }
func (*EventEntity) DataToStruct ¶
func (es *EventEntity) DataToStruct(data any) (err error)
type Eventsam ¶
type Eventsam struct {
// contains filtered or unexported fields
}
func (*Eventsam) FetchAggregateEvent ¶
func (es *Eventsam) FetchAggregateEvent(aggregateName string, afterID, limit int) (events []EventEntity, err error)
func (*Eventsam) FetchAggregatesEvent ¶
func (es *Eventsam) FetchAggregatesEvent(aggregateNames []string, afterID, limit int) (events []EventEntity, err error)
func (*Eventsam) FetchAllEvent ¶
func (es *Eventsam) FetchAllEvent(afterID, limit int) (events []EventEntity, err error)
func (*Eventsam) SetPublisher ¶
type Publisher ¶
type Publisher interface {
Publish(event EventEntity) (err error)
}
Click to show internal directories.
Click to hide internal directories.