psmock
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
package psmock contains a mocked implementation of the pubsub.Pubsub interface for use in tests
Package psmock is a generated GoMock package.
Index¶
- type MockPubsub
- func (m *MockPubsub) Close() error
- func (m *MockPubsub) EXPECT() *MockPubsubMockRecorder
- func (m *MockPubsub) Publish(event string, message []byte) error
- func (m *MockPubsub) Subscribe(event string, listener pubsub.Listener) (func(), error)
- func (m *MockPubsub) SubscribeWithErr(event string, listener pubsub.ListenerWithErr) (func(), error)
- type MockPubsubMockRecorder
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
This section is empty.
Types¶
typeMockPubsub¶
type MockPubsub struct {// contains filtered or unexported fields}
MockPubsub is a mock of Pubsub interface.
funcNewMockPubsub¶
func NewMockPubsub(ctrl *gomock.Controller) *MockPubsub
NewMockPubsub creates a new mock instance.
func (*MockPubsub)EXPECT¶
func (m *MockPubsub) EXPECT() *MockPubsubMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPubsub)Publish¶
func (m *MockPubsub) Publish(eventstring, message []byte)error
Publish mocks base method.
func (*MockPubsub)Subscribe¶
func (m *MockPubsub) Subscribe(eventstring, listenerpubsub.Listener) (func(),error)
Subscribe mocks base method.
func (*MockPubsub)SubscribeWithErr¶
func (m *MockPubsub) SubscribeWithErr(eventstring, listenerpubsub.ListenerWithErr) (func(),error)
SubscribeWithErr mocks base method.
typeMockPubsubMockRecorder¶
type MockPubsubMockRecorder struct {// contains filtered or unexported fields}
MockPubsubMockRecorder is the mock recorder for MockPubsub.
func (*MockPubsubMockRecorder)Close¶
func (mr *MockPubsubMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockPubsubMockRecorder)Publish¶
func (mr *MockPubsubMockRecorder) Publish(event, messageany) *gomock.Call
Publish indicates an expected call of Publish.
func (*MockPubsubMockRecorder)Subscribe¶
func (mr *MockPubsubMockRecorder) Subscribe(event, listenerany) *gomock.Call
Subscribe indicates an expected call of Subscribe.
func (*MockPubsubMockRecorder)SubscribeWithErr¶
func (mr *MockPubsubMockRecorder) SubscribeWithErr(event, listenerany) *gomock.Call
SubscribeWithErr indicates an expected call of SubscribeWithErr.