Documentation ¶
Index ¶
- func CreateBoltDB(t *testing.T) *bbolt.DB
- func CreateSerializer(t *testing.T) *watcher.JSONSerializer
- func EventWithSeqNum(seqNum uint64) gomock.Matcher
- type EventStoreWrapper
- func (w *EventStoreWrapper) Close(ctx context.Context) error
- func (w *EventStoreWrapper) GetCheckpoint(ctx context.Context, watcherID string) (uint64, error)
- func (w *EventStoreWrapper) GetEvents(ctx context.Context, params watcher.GetEventsRequest) (*watcher.GetEventsResponse, error)
- func (w *EventStoreWrapper) GetLatestEventNum(ctx context.Context) (uint64, error)
- func (w *EventStoreWrapper) StoreCheckpoint(ctx context.Context, watcherID string, eventSeqNum uint64) error
- func (w *EventStoreWrapper) StoreEvent(ctx context.Context, operation watcher.Operation, objectType string, ...) error
- func (w *EventStoreWrapper) WithCloseInterceptor(f Interceptor) *EventStoreWrapper
- func (w *EventStoreWrapper) WithGetCheckpointInterceptor(f Interceptor) *EventStoreWrapper
- func (w *EventStoreWrapper) WithGetEventsInterceptor(f Interceptor) *EventStoreWrapper
- func (w *EventStoreWrapper) WithGetLatestEventInterceptor(f Interceptor) *EventStoreWrapper
- func (w *EventStoreWrapper) WithStoreCheckpointInterceptor(f Interceptor) *EventStoreWrapper
- func (w *EventStoreWrapper) WithStoreEventInterceptor(f Interceptor) *EventStoreWrapper
- type Interceptor
- type TestObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBoltDB ¶
CreateBoltDB creates a new BoltDB database for testing
func CreateSerializer ¶
func CreateSerializer(t *testing.T) *watcher.JSONSerializer
CreateSerializer creates a new JSONSerializer for testing
func EventWithSeqNum ¶
EventWithSeqNum is a matcher that matches an event with a specific sequence number
Types ¶
type EventStoreWrapper ¶
type EventStoreWrapper struct {
// contains filtered or unexported fields
}
EventStoreWrapper provides a way to intercept and modify the behavior of an EventStore for testing purposes. It wraps an actual EventStore and allows setting interceptors for each method.
func NewEventStoreWrapper ¶
func NewEventStoreWrapper(actualStore watcher.EventStore) *EventStoreWrapper
func (*EventStoreWrapper) GetCheckpoint ¶
func (*EventStoreWrapper) GetEvents ¶
func (w *EventStoreWrapper) GetEvents(ctx context.Context, params watcher.GetEventsRequest) (*watcher.GetEventsResponse, error)
func (*EventStoreWrapper) GetLatestEventNum ¶
func (w *EventStoreWrapper) GetLatestEventNum(ctx context.Context) (uint64, error)
func (*EventStoreWrapper) StoreCheckpoint ¶
func (*EventStoreWrapper) StoreEvent ¶
func (*EventStoreWrapper) WithCloseInterceptor ¶
func (w *EventStoreWrapper) WithCloseInterceptor(f Interceptor) *EventStoreWrapper
func (*EventStoreWrapper) WithGetCheckpointInterceptor ¶
func (w *EventStoreWrapper) WithGetCheckpointInterceptor(f Interceptor) *EventStoreWrapper
func (*EventStoreWrapper) WithGetEventsInterceptor ¶
func (w *EventStoreWrapper) WithGetEventsInterceptor(f Interceptor) *EventStoreWrapper
func (*EventStoreWrapper) WithGetLatestEventInterceptor ¶
func (w *EventStoreWrapper) WithGetLatestEventInterceptor(f Interceptor) *EventStoreWrapper
func (*EventStoreWrapper) WithStoreCheckpointInterceptor ¶
func (w *EventStoreWrapper) WithStoreCheckpointInterceptor(f Interceptor) *EventStoreWrapper
func (*EventStoreWrapper) WithStoreEventInterceptor ¶
func (w *EventStoreWrapper) WithStoreEventInterceptor(f Interceptor) *EventStoreWrapper
type Interceptor ¶
type Interceptor func() error
type TestObject ¶
Click to show internal directories.
Click to hide internal directories.