Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DomainEntityNotFound ¶ added in v0.2.0
type DomainValidationFailed ¶ added in v0.2.0
type EntityPage ¶ added in v0.4.0
type EventClass ¶ added in v0.2.0
type EventClass string
const ( CommandEvent EventClass = "C" DomainEvent EventClass = "D" BusinessEvent EventClass = "B" SystemEvent EventClass = "S" )
type EventFactory ¶
type EventFactory interface {
NewSystemEvent(ctx context.Context, data interface{}) Event
NewCommandEvent(ctx context.Context, data interface{}) Event
NewBusinessEvent(ctx context.Context, data interface{}) Event
NewDomainEvent(ctx context.Context, data interface{}, entity Entity, state interface{}) Event
NewFirstDomainEvent(ctx context.Context, data interface{}, state interface{}) Event
NewFirstDomainEventWithCustomID(ctx context.Context, data interface{}, id string, state interface{}) Event
NewSystemEventWithCustomType(ctx context.Context, typ string, data interface{}) Event
NewCommandEventWithCustomType(ctx context.Context, typ string, data interface{}) Event
NewBusinessEventWithCustomType(ctx context.Context, typ string, data interface{}) Event
NewDomainEventWithCustomType(ctx context.Context, typ string, data interface{}, entity Entity, state interface{}) Event
NewFirstDomainEventWithCustomType(ctx context.Context, typ string, data interface{}, state interface{}) Event
NewFirstDomainEventWithCustomIDAndCustomType(ctx context.Context, typ string, data interface{}, id string, state interface{}) Event
}
type EventHandlingFailed ¶ added in v0.4.0
type EventStore ¶
type EventStore interface {
GetLastEvent(ctx context.Context, source string) Event
GetEventByID(ctx context.Context, source string, id string) Event
GetEntityEvents(ctx context.Context, typ string, id string,
after *time.Time, before *time.Time, nextToken *string, limit *int64) EventPage
GetDayEvents(ctx context.Context, day string,
after *time.Time, before *time.Time, nextToken *string, limit *int64) EventPage
GetTypeEvents(ctx context.Context, typ string,
after *time.Time, before *time.Time, nextToken *string, limit *int64) EventPage
GetAuthorEvents(ctx context.Context, author string,
after *time.Time, before *time.Time, nextToken *string, limit *int64) EventPage
GetTransactionEvents(ctx context.Context, transaction string,
after *time.Time, before *time.Time, nextToken *string, limit *int64) EventPage
}
type NoEventGenerated ¶ added in v0.7.0
type NoEventGenerated struct {
Handler string `json:"handler,omitempty"`
}
type StateStore ¶
type StateStore interface {
GetLastVersion(ctx context.Context, typ string, id string) Entity
GetByVersion(ctx context.Context, typ string, id string, version uint64) Entity
GetVersions(ctx context.Context, typ string, id string,
after *uint64, before *uint64, nextToken *string, limit *int64) VersionPage
GetByType(ctx context.Context, typ string,
after *time.Time, nextToken *string, limit *int64) EntityPage
}
type VersionPage ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.