Documentation ¶
Overview ¶
Package mutator is a generated GoMock package.
Index ¶
- Variables
- type AfterCommandFunc
- type BeforeCommandFunc
- type BeforeEventFunc
- type CommandHandler
- type CommandHandlerFunc
- type CommandWithReplyHandlerFunc
- type ContextFunc
- type Controller
- func (c *Controller) CommandHandler(h CommandHandler)
- func (c *Controller) EventHandler(h EventHandler)
- func (c *Controller) HandleEvent(ctx context.Context, e stream.Event) error
- func (c *Controller) MatchEvent(ctx context.Context, et stream.EventType) bool
- func (c *Controller) Receive(ctx context.Context, cmd stream.Command) (r *stream.Reply, err error)
- func (c *Controller) Sink() *Sink
- type ErrorFormatter
- type ErrorHandlerFunc
- type EventHandler
- type EventHandlerFunc
- type MockCommandHandler
- type MockCommandHandlerMockRecorder
- type MockEventHandler
- func (m *MockEventHandler) BeforeHandleEvent(arg0 stream.Event) stream.ID
- func (m *MockEventHandler) EXPECT() *MockEventHandlerMockRecorder
- func (m *MockEventHandler) HandleEvent(arg0 context.Context, arg1 stream.Event, arg2 stream.Stream) error
- func (m *MockEventHandler) MatchEvent(arg0 context.Context, arg1 stream.EventType) bool
- type MockEventHandlerMockRecorder
- type Option
- type Sink
- func (s *Sink) BeforeHandleEvent(e stream.Event) stream.ID
- func (s *Sink) C(ct stream.CommandType, h CommandHandlerFunc) *Sink
- func (s *Sink) Command(ct stream.CommandType, h CommandHandlerFunc) *Sink
- func (s *Sink) CommandWithReply(ct stream.CommandType, h CommandWithReplyHandlerFunc) *Sink
- func (s *Sink) E(et stream.EventType, ps StreamFromEvent, h EventHandlerFunc) *Sink
- func (s *Sink) Event(et stream.EventType, ps StreamFromEvent, h EventHandlerFunc) *Sink
- func (s *Sink) From(ct stream.CommandType, h CommandHandlerFunc) *Sink
- func (s *Sink) HandleCommand(ctx context.Context, cmd stream.Command, es stream.Stream) (*stream.Reply, error)
- func (s *Sink) HandleEvent(ctx context.Context, e stream.Event, es stream.Stream) error
- func (s *Sink) MatchEvent(_ context.Context, et stream.EventType) (ok bool)
- type StreamFromEvent
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type AfterCommandFunc ¶
type CommandHandler ¶
type CommandHandlerFunc ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func New ¶
func New(st stream.Type, f repository.MakeStream, r repository.Repository, opts ...Option) *Controller
func (*Controller) CommandHandler ¶
func (c *Controller) CommandHandler(h CommandHandler)
func (*Controller) EventHandler ¶
func (c *Controller) EventHandler(h EventHandler)
func (*Controller) HandleEvent ¶
func (*Controller) MatchEvent ¶
func (*Controller) Sink ¶
func (c *Controller) Sink() *Sink
type EventHandler ¶
type EventHandlerFunc ¶
type MockCommandHandler ¶
type MockCommandHandler struct {
// contains filtered or unexported fields
}
MockCommandHandler is a mock of CommandHandler interface
func NewMockCommandHandler ¶
func NewMockCommandHandler(ctrl *gomock.Controller) *MockCommandHandler
NewMockCommandHandler creates a new mock instance
func (*MockCommandHandler) EXPECT ¶
func (m *MockCommandHandler) EXPECT() *MockCommandHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockCommandHandlerMockRecorder ¶
type MockCommandHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockCommandHandlerMockRecorder is the mock recorder for MockCommandHandler
func (*MockCommandHandlerMockRecorder) HandleCommand ¶
func (mr *MockCommandHandlerMockRecorder) HandleCommand(arg0, arg1, arg2 interface{}) *gomock.Call
HandleCommand indicates an expected call of HandleCommand
type MockEventHandler ¶
type MockEventHandler struct {
// contains filtered or unexported fields
}
MockEventHandler is a mock of EventHandler interface
func NewMockEventHandler ¶
func NewMockEventHandler(ctrl *gomock.Controller) *MockEventHandler
NewMockEventHandler creates a new mock instance
func (*MockEventHandler) BeforeHandleEvent ¶
func (m *MockEventHandler) BeforeHandleEvent(arg0 stream.Event) stream.ID
BeforeHandleEvent mocks base method
func (*MockEventHandler) EXPECT ¶
func (m *MockEventHandler) EXPECT() *MockEventHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockEventHandler) HandleEvent ¶
func (m *MockEventHandler) HandleEvent(arg0 context.Context, arg1 stream.Event, arg2 stream.Stream) error
HandleEvent mocks base method
func (*MockEventHandler) MatchEvent ¶
MatchEvent mocks base method
type MockEventHandlerMockRecorder ¶
type MockEventHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockEventHandlerMockRecorder is the mock recorder for MockEventHandler
func (*MockEventHandlerMockRecorder) BeforeHandleEvent ¶
func (mr *MockEventHandlerMockRecorder) BeforeHandleEvent(arg0 interface{}) *gomock.Call
BeforeHandleEvent indicates an expected call of BeforeHandleEvent
func (*MockEventHandlerMockRecorder) HandleEvent ¶
func (mr *MockEventHandlerMockRecorder) HandleEvent(arg0, arg1, arg2 interface{}) *gomock.Call
HandleEvent indicates an expected call of HandleEvent
func (*MockEventHandlerMockRecorder) MatchEvent ¶
func (mr *MockEventHandlerMockRecorder) MatchEvent(arg0, arg1 interface{}) *gomock.Call
MatchEvent indicates an expected call of MatchEvent
type Option ¶
type Option func(*Controller)
func AfterCommand ¶
func AfterCommand(f ...AfterCommandFunc) Option
func BeforeCommand ¶
func BeforeCommand(f ...BeforeCommandFunc) Option
func BeforeEvent ¶
func BeforeEvent(f ...BeforeEventFunc) Option
func ErrorHandler ¶
func ErrorHandler(f ...ErrorHandlerFunc) Option
func WithContext ¶
func WithContext(ctx ...ContextFunc) Option
func WithErrorFormatter ¶
func WithErrorFormatter(f ErrorFormatter) Option
type Sink ¶
type Sink struct {
// contains filtered or unexported fields
}
func (*Sink) C ¶
func (s *Sink) C(ct stream.CommandType, h CommandHandlerFunc) *Sink
func (*Sink) Command ¶
func (s *Sink) Command(ct stream.CommandType, h CommandHandlerFunc) *Sink
func (*Sink) CommandWithReply ¶
func (s *Sink) CommandWithReply(ct stream.CommandType, h CommandWithReplyHandlerFunc) *Sink
func (*Sink) E ¶
func (s *Sink) E(et stream.EventType, ps StreamFromEvent, h EventHandlerFunc) *Sink
func (*Sink) Event ¶
func (s *Sink) Event(et stream.EventType, ps StreamFromEvent, h EventHandlerFunc) *Sink
func (*Sink) From ¶
func (s *Sink) From(ct stream.CommandType, h CommandHandlerFunc) *Sink