Documentation ¶
Overview ¶
Package db is a generated GoMock package.
Index ¶
- Variables
- type DB
- type ErrorFunc
- type Event
- type EventFunc
- type Hook
- type MockDB
- func (m *MockDB) Close() error
- func (m *MockDB) Connect(ctx context.Context, fn func() error) error
- func (m *MockDB) EXPECT() *MockDBMockRecorder
- func (m *MockDB) OnEvent(eventFunc EventFunc)
- func (m *MockDB) UpdateVersion(ctx context.Context, aggregateID, aggregateType string, version int) error
- func (m *MockDB) WalkUnpublishedEvents(ctx context.Context, fn UnpublishedAggregateFunc) error
- type MockDBMockRecorder
- func (mr *MockDBMockRecorder) Close() *gomock.Call
- func (mr *MockDBMockRecorder) Connect(ctx, fn interface{}) *gomock.Call
- func (mr *MockDBMockRecorder) OnEvent(eventFunc interface{}) *gomock.Call
- func (mr *MockDBMockRecorder) UpdateVersion(ctx, aggregateID, aggregateType, version interface{}) *gomock.Call
- func (mr *MockDBMockRecorder) WalkUnpublishedEvents(ctx, fn interface{}) *gomock.Call
- type UnpublishedAggregate
- type UnpublishedAggregateFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrConnectionClosed = errors.New("esp: postgreSQL database connections are closed") ErrUpdateVersion = errors.New("esp: failed to update version") )
View Source
var ErrInvalidEventFormat = errors.New("esp: invalid event format")
Functions ¶
This section is empty.
Types ¶
type DB ¶
type MockDB ¶
type MockDB struct {
// contains filtered or unexported fields
}
MockDB is a mock of DB interface
func NewMockDB ¶
func NewMockDB(ctrl *gomock.Controller) *MockDB
NewMockDB creates a new mock instance
func (*MockDB) EXPECT ¶
func (m *MockDB) EXPECT() *MockDBMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockDB) UpdateVersion ¶
func (m *MockDB) UpdateVersion(ctx context.Context, aggregateID, aggregateType string, version int) error
UpdateVersion mocks base method
func (*MockDB) WalkUnpublishedEvents ¶
func (m *MockDB) WalkUnpublishedEvents(ctx context.Context, fn UnpublishedAggregateFunc) error
WalkUnpublishedEvents mocks base method
type MockDBMockRecorder ¶
type MockDBMockRecorder struct {
// contains filtered or unexported fields
}
MockDBMockRecorder is the mock recorder for MockDB
func (*MockDBMockRecorder) Close ¶
func (mr *MockDBMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockDBMockRecorder) Connect ¶
func (mr *MockDBMockRecorder) Connect(ctx, fn interface{}) *gomock.Call
Connect indicates an expected call of Connect
func (*MockDBMockRecorder) OnEvent ¶
func (mr *MockDBMockRecorder) OnEvent(eventFunc interface{}) *gomock.Call
OnEvent indicates an expected call of OnEvent
func (*MockDBMockRecorder) UpdateVersion ¶
func (mr *MockDBMockRecorder) UpdateVersion(ctx, aggregateID, aggregateType, version interface{}) *gomock.Call
UpdateVersion indicates an expected call of UpdateVersion
func (*MockDBMockRecorder) WalkUnpublishedEvents ¶
func (mr *MockDBMockRecorder) WalkUnpublishedEvents(ctx, fn interface{}) *gomock.Call
WalkUnpublishedEvents indicates an expected call of WalkUnpublishedEvents
type UnpublishedAggregate ¶
type UnpublishedAggregate struct { AggregateID string AggregateType string LatestPublishedVersion int CurrentVersion int Events []*Event }
func (UnpublishedAggregate) TotalUnpublished ¶
func (ua UnpublishedAggregate) TotalUnpublished() int
type UnpublishedAggregateFunc ¶
type UnpublishedAggregateFunc func(ctx context.Context, aggregate *UnpublishedAggregate) error
Click to show internal directories.
Click to hide internal directories.