mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
* feat(EN-214): add outbox table migration * feat(EN-214): add outbox models and storage layer * feat(EN-214): implement outbox publisher activity * feat(EN-214): implement outbox schedule activity * feat(EN-214): add outbox publisher workflow * feat(EN-214): migrate accounts to outbox pattern * feat(EN-214): migrate balances to outbox pattern * feat(EN-214): migrate payments to outbox pattern * feat(EN-214): migrate bank accounts to outbox pattern * feat(EN-214): migrate pools to outbox pattern * feat(EN-214): migrate payment initiations to outbox pattern * feat(EN-214): migrate PSU and connections to outbox pattern * feat(EN-214): migrate connectors to outbox pattern * feat(EN-214): remove legacy send_events workflow * feat(EN-214): update workflows to use outbox pattern * feat(EN-214): improve outbox idempotency and error handling * feat(EN-214): update storage tasks and tests * test(EN-214): update e2e tests for outbox pattern * test(EN-214): clean up workflow tests * chore(EN-214): update docker compose configuration * feat(EN-214): add e2e run config in ide * fix: add back docker-compose-dev run config * chore: improve connector uninstall comments & remove connector id being passed * fix: ensure events are not pushed if balances are not created * fix: ensure err is not overwritten when using rollback * fix: ensure we use v3 provider format * chore: apply the nitpick comments from coderabbit * chore: consistentely use e() error handling * feat: optionally disable publisher schedule to make e2e test more consistent * fix: improve error handling on uninstall connector * avoid using custom payload and rely on existing interfaces; also avoid using different types for events * fix: remove unecessary unmarshalling * fix: ensure that rollbackOnTxError picks up errors on tx.Commit() * fix: add extra validation on iban & account number in the test * test: cover marshall/unmarshalling of event payload * fix: increase test timeout * try to make test more resiliant * fix: wrong pointer use in loop * fix: error formatting issue * fix: move oubtox schedule creation out of an activity and do it in the worker itself * feat: OutboxEventDeleteAndSend as batch * change outbox_event to have id only instead of idempotency key * make e2e test less brittle, save eventID as idempotency key in publication * feat: make outbox_event keep an history * feat(EN-214): added a schedule to cleanup outbox events * test: make cleanup actually clean * ignore linting rules for now * feat: do not add psu metadata to event anymore as it's irrelevant * fix: create local variable instead of relying on pointers, even if not 100% necessary * fix: remove temporal schedule describe calls
75 lines
2.1 KiB
Go
75 lines
2.1 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: publisher.go
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -source publisher.go -destination publisher_generated.go -package activities . Publisher
|
|
//
|
|
|
|
// Package activities is a generated GoMock package.
|
|
package activities
|
|
|
|
import (
|
|
reflect "reflect"
|
|
|
|
message "github.com/ThreeDotsLabs/watermill/message"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockPublisher is a mock of Publisher interface.
|
|
type MockPublisher struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockPublisherMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockPublisherMockRecorder is the mock recorder for MockPublisher.
|
|
type MockPublisherMockRecorder struct {
|
|
mock *MockPublisher
|
|
}
|
|
|
|
// NewMockPublisher creates a new mock instance.
|
|
func NewMockPublisher(ctrl *gomock.Controller) *MockPublisher {
|
|
mock := &MockPublisher{ctrl: ctrl}
|
|
mock.recorder = &MockPublisherMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockPublisher) EXPECT() *MockPublisherMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Close mocks base method.
|
|
func (m *MockPublisher) Close() error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Close")
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Close indicates an expected call of Close.
|
|
func (mr *MockPublisherMockRecorder) Close() *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockPublisher)(nil).Close))
|
|
}
|
|
|
|
// Publish mocks base method.
|
|
func (m *MockPublisher) Publish(topic string, messages ...*message.Message) error {
|
|
m.ctrl.T.Helper()
|
|
varargs := []any{topic}
|
|
for _, a := range messages {
|
|
varargs = append(varargs, a)
|
|
}
|
|
ret := m.ctrl.Call(m, "Publish", varargs...)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Publish indicates an expected call of Publish.
|
|
func (mr *MockPublisherMockRecorder) Publish(topic any, messages ...any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
varargs := append([]any{topic}, messages...)
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Publish", reflect.TypeOf((*MockPublisher)(nil).Publish), varargs...)
|
|
}
|