Documentation ¶
Index ¶
- Constants
- func AddedEventMapper(event *repository.Event) (eventstore.Event, error)
- func ChangeAllowedToFail(allowedToFail bool) func(event *ChangedEvent)
- func ChangeName(name, oldName string) func(event *ChangedEvent)
- func ChangeScript(script string) func(event *ChangedEvent)
- func ChangeTimeout(timeout time.Duration) func(event *ChangedEvent)
- func ChangedEventMapper(event *repository.Event) (eventstore.Event, error)
- func DeactivatedEventMapper(event *repository.Event) (eventstore.Event, error)
- func NewAddActionNameUniqueConstraint(actionName, resourceOwner string) *eventstore.EventUniqueConstraint
- func NewRemoveActionNameUniqueConstraint(actionName, resourceOwner string) *eventstore.EventUniqueConstraint
- func ReactivatedEventMapper(event *repository.Event) (eventstore.Event, error)
- func RegisterEventMappers(es *eventstore.Eventstore)
- func RemovedEventMapper(event *repository.Event) (eventstore.Event, error)
- type ActionChanges
- type AddedEvent
- type Aggregate
- type ChangedEvent
- type DeactivatedEvent
- type ReactivatedEvent
- type RemovedEvent
Constants ¶
View Source
const ( UniqueActionNameType = "action_names" AddedEventType = eventTypePrefix + "added" ChangedEventType = eventTypePrefix + "changed" DeactivatedEventType = eventTypePrefix + "deactivated" ReactivatedEventType = eventTypePrefix + "reactivated" RemovedEventType = eventTypePrefix + "removed" )
View Source
const ( AggregateType = "action" AggregateVersion = "v1" )
Variables ¶
This section is empty.
Functions ¶
func AddedEventMapper ¶
func AddedEventMapper(event *repository.Event) (eventstore.Event, error)
func ChangeAllowedToFail ¶
func ChangeAllowedToFail(allowedToFail bool) func(event *ChangedEvent)
func ChangeName ¶
func ChangeName(name, oldName string) func(event *ChangedEvent)
func ChangeScript ¶
func ChangeScript(script string) func(event *ChangedEvent)
func ChangeTimeout ¶
func ChangeTimeout(timeout time.Duration) func(event *ChangedEvent)
func ChangedEventMapper ¶
func ChangedEventMapper(event *repository.Event) (eventstore.Event, error)
func DeactivatedEventMapper ¶
func DeactivatedEventMapper(event *repository.Event) (eventstore.Event, error)
func NewAddActionNameUniqueConstraint ¶
func NewAddActionNameUniqueConstraint(actionName, resourceOwner string) *eventstore.EventUniqueConstraint
func NewRemoveActionNameUniqueConstraint ¶
func NewRemoveActionNameUniqueConstraint(actionName, resourceOwner string) *eventstore.EventUniqueConstraint
func ReactivatedEventMapper ¶
func ReactivatedEventMapper(event *repository.Event) (eventstore.Event, error)
func RegisterEventMappers ¶
func RegisterEventMappers(es *eventstore.Eventstore)
func RemovedEventMapper ¶
func RemovedEventMapper(event *repository.Event) (eventstore.Event, error)
Types ¶
type ActionChanges ¶
type ActionChanges func(event *ChangedEvent)
type AddedEvent ¶
type AddedEvent struct { eventstore.BaseEvent `json:"-"` Name string `json:"name"` Script string `json:"script,omitempty"` Timeout time.Duration `json:"timeout,omitempty"` AllowedToFail bool `json:"allowedToFail"` }
func NewAddedEvent ¶
func NewAddedEvent( ctx context.Context, aggregate *eventstore.Aggregate, name, script string, timeout time.Duration, allowedToFail bool, ) *AddedEvent
func (*AddedEvent) Data ¶
func (e *AddedEvent) Data() interface{}
func (*AddedEvent) UniqueConstraints ¶
func (e *AddedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint
type ChangedEvent ¶
type ChangedEvent struct { eventstore.BaseEvent `json:"-"` Name *string `json:"name,omitempty"` Script *string `json:"script,omitempty"` Timeout *time.Duration `json:"timeout,omitempty"` AllowedToFail *bool `json:"allowedToFail,omitempty"` // contains filtered or unexported fields }
func NewChangedEvent ¶
func NewChangedEvent( ctx context.Context, aggregate *eventstore.Aggregate, changes []ActionChanges, ) (*ChangedEvent, error)
func (*ChangedEvent) Data ¶
func (e *ChangedEvent) Data() interface{}
func (*ChangedEvent) UniqueConstraints ¶
func (e *ChangedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint
type DeactivatedEvent ¶
type DeactivatedEvent struct {
eventstore.BaseEvent `json:"-"`
}
func NewDeactivatedEvent ¶
func NewDeactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *DeactivatedEvent
func (*DeactivatedEvent) Data ¶
func (e *DeactivatedEvent) Data() interface{}
func (*DeactivatedEvent) UniqueConstraints ¶
func (e *DeactivatedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint
type ReactivatedEvent ¶
type ReactivatedEvent struct {
eventstore.BaseEvent `json:"-"`
}
func NewReactivatedEvent ¶
func NewReactivatedEvent(ctx context.Context, aggregate *eventstore.Aggregate) *ReactivatedEvent
func (*ReactivatedEvent) Data ¶
func (e *ReactivatedEvent) Data() interface{}
func (*ReactivatedEvent) UniqueConstraints ¶
func (e *ReactivatedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint
type RemovedEvent ¶
type RemovedEvent struct { eventstore.BaseEvent `json:"-"` // contains filtered or unexported fields }
func NewRemovedEvent ¶
func NewRemovedEvent( ctx context.Context, aggregate *eventstore.Aggregate, name string, ) *RemovedEvent
func (*RemovedEvent) Data ¶
func (e *RemovedEvent) Data() interface{}
func (*RemovedEvent) UniqueConstraints ¶
func (e *RemovedEvent) UniqueConstraints() []*eventstore.EventUniqueConstraint
Click to show internal directories.
Click to hide internal directories.