Documentation
¶
Overview ¶
Package fixtures is a set of test fixtures and mocks for SQL projections.
Index ¶
- type MessageHandler
- func (h *MessageHandler) Compact(ctx context.Context, db *sql.DB, s dogma.ProjectionCompactScope) error
- func (h *MessageHandler) Configure(c dogma.ProjectionConfigurer)
- func (h *MessageHandler) HandleEvent(ctx context.Context, tx *sql.Tx, s dogma.ProjectionEventScope, m dogma.Event) error
- func (h *MessageHandler) Reset(ctx context.Context, tx *sql.Tx, s dogma.ProjectionResetScope) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageHandler ¶
type MessageHandler struct {
ConfigureFunc func(dogma.ProjectionConfigurer)
HandleEventFunc func(context.Context, *sql.Tx, dogma.ProjectionEventScope, dogma.Event) error
CompactFunc func(context.Context, *sql.DB, dogma.ProjectionCompactScope) error
ResetFunc func(context.Context, *sql.Tx, dogma.ProjectionResetScope) error
}
MessageHandler is a test implementation of sql.MessageHandler.
func (*MessageHandler) Compact ¶
func (h *MessageHandler) Compact(ctx context.Context, db *sql.DB, s dogma.ProjectionCompactScope) error
Compact reduces the projection's size by removing or consolidating data.
func (*MessageHandler) Configure ¶
func (h *MessageHandler) Configure(c dogma.ProjectionConfigurer)
Configure declares the handler's configuration by calling methods on c.
func (*MessageHandler) HandleEvent ¶
func (h *MessageHandler) HandleEvent( ctx context.Context, tx *sql.Tx, s dogma.ProjectionEventScope, m dogma.Event, ) error
HandleEvent updates the projection to reflect the occurrence of an [Event].
func (*MessageHandler) Reset ¶ added in v0.9.0
func (h *MessageHandler) Reset(ctx context.Context, tx *sql.Tx, s dogma.ProjectionResetScope) error
Reset clears all projection data.
Click to show internal directories.
Click to hide internal directories.