Documentation
¶
Index ¶
- func FilterAllEventTypesForOneBook(bookID uuid.UUID) Filter
- func FilterAllEventTypesForOneBookOrReader(bookID uuid.UUID, readerID uuid.UUID) Filter
- func FixtureBookCopyAddedToCirculation(bookID uuid.UUID, fakeClock time.Time) DomainEvent
- func FixtureBookCopyLentToReader(bookID uuid.UUID, readerID uuid.UUID, fakeClock time.Time) DomainEvent
- func FixtureBookCopyRemovedFromCirculation(bookID uuid.UUID, fakeClock time.Time) DomainEvent
- func FixtureBookCopyReturnedByReader(bookID uuid.UUID, readerID uuid.UUID, fakeClock time.Time) DomainEvent
- func GivenBookCopyAddedToCirculationWasAppended(t testing.TB, ctx context.Context, es EventStore, bookID uuid.UUID, ...) DomainEvent
- func GivenBookCopyLentToReaderWasAppended(t testing.TB, ctx context.Context, es EventStore, bookID uuid.UUID, ...) DomainEvent
- func GivenBookCopyRemovedFromCirculationWasAppended(t testing.TB, ctx context.Context, es EventStore, bookID uuid.UUID, ...) DomainEvent
- func GivenBookCopyReturnedByReaderWasAppended(t testing.TB, ctx context.Context, es EventStore, bookID uuid.UUID, ...) DomainEvent
- func GivenSomeOtherEventsWereAppended(t testing.TB, ctx context.Context, es EventStore, numEvents int, ...) time.Time
- func GivenUniqueID(t testing.TB) uuid.UUID
- func QueryMaxSequenceNumberBeforeAppend(t testing.TB, ctx context.Context, es EventStore, filter Filter) MaxSequenceNumberUint
- func ToStorable(t testing.TB, domainEvent DomainEvent) StorableEvent
- func ToStorableWithMetadata(t testing.TB, domainEvent DomainEvent, eventMetadata EventMetadata) StorableEvent
- type TestLogHandler
- func (h *TestLogHandler) Enabled(_ context.Context, _ slog.Level) bool
- func (h *TestLogHandler) GetRecordCount() int
- func (h *TestLogHandler) GetRecords() []slog.Record
- func (h *TestLogHandler) Handle(_ context.Context, record slog.Record) error
- func (h *TestLogHandler) HasDebugLogWithMessage(message string) bool
- func (h *TestLogHandler) Reset()
- func (h *TestLogHandler) WithAttrs(_ []slog.Attr) slog.Handler
- func (h *TestLogHandler) WithGroup(_ string) slog.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToStorable ¶
func ToStorableWithMetadata ¶
Types ¶
type TestLogHandler ¶
type TestLogHandler struct {
// contains filtered or unexported fields
}
TestLogHandler is a slog.Handler implementation that captures log records for testing
func NewTestLogHandler ¶
func NewTestLogHandler() *TestLogHandler
NewTestLogHandler creates a new TestLogHandler
func (*TestLogHandler) GetRecordCount ¶
func (h *TestLogHandler) GetRecordCount() int
GetRecordCount returns the number of captured log records
func (*TestLogHandler) GetRecords ¶
func (h *TestLogHandler) GetRecords() []slog.Record
GetRecords returns a copy of all captured log records
func (*TestLogHandler) HasDebugLogWithMessage ¶
func (h *TestLogHandler) HasDebugLogWithMessage(message string) bool
HasDebugLogWithMessage checks if there's a debug-level log record containing the specified message
func (*TestLogHandler) Reset ¶
func (h *TestLogHandler) Reset()
Reset clears all captured log records
Click to show internal directories.
Click to hide internal directories.