Documentation ¶
Overview ¶
Package event is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrEventChanCast = errors.New("unable to cast event channel to []chan *Event") ErrNoSubscriberForEventType = errors.New("no subscriber for this event type") )
Functions ¶
Types ¶
type CheckEvent ¶
type Dispatcher ¶
type ItemAction ¶
type ItemAction string
const ( ItemActionCreate ItemAction = "create" ItemActionUpdate ItemAction = "update" )
type ItemEvent ¶
type ItemEvent struct { Action ItemAction Data any }
type MockDispatcher ¶
type MockDispatcher struct {
// contains filtered or unexported fields
}
MockDispatcher is a mock of Dispatcher interface.
func NewMockDispatcher ¶
func NewMockDispatcher(ctrl *gomock.Controller) *MockDispatcher
NewMockDispatcher creates a new mock instance.
func (*MockDispatcher) Dispatch ¶
func (m *MockDispatcher) Dispatch(eventType EventType, data any) error
Dispatch mocks base method.
func (*MockDispatcher) EXPECT ¶
func (m *MockDispatcher) EXPECT() *MockDispatcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockDispatcher) Subscribe ¶
func (m *MockDispatcher) Subscribe(eventType EventType) chan *Event
Subscribe mocks base method.
func (*MockDispatcher) Unsubscribe ¶
func (m *MockDispatcher) Unsubscribe(eventType EventType, eventChanToClose chan *Event) error
Unsubscribe mocks base method.
type MockDispatcherMockRecorder ¶
type MockDispatcherMockRecorder struct {
// contains filtered or unexported fields
}
MockDispatcherMockRecorder is the mock recorder for MockDispatcher.
func (*MockDispatcherMockRecorder) Dispatch ¶
func (mr *MockDispatcherMockRecorder) Dispatch(eventType, data interface{}) *gomock.Call
Dispatch indicates an expected call of Dispatch.
func (*MockDispatcherMockRecorder) Subscribe ¶
func (mr *MockDispatcherMockRecorder) Subscribe(eventType interface{}) *gomock.Call
Subscribe indicates an expected call of Subscribe.
func (*MockDispatcherMockRecorder) Unsubscribe ¶
func (mr *MockDispatcherMockRecorder) Unsubscribe(eventType, eventChanToClose interface{}) *gomock.Call
Unsubscribe indicates an expected call of Unsubscribe.
Click to show internal directories.
Click to hide internal directories.