Documentation ¶
Overview ¶
Package messaging is a generated GoMock package.
Index ¶
- Constants
- type Connection
- type ConnectionDialer
- type ConnectionTypes
- type Consumer
- type Context
- type Event
- type Listener
- type ListenerTypes
- type MockConnection
- type MockConnectionMockRecorder
- type MockConsumer
- type MockConsumerMockRecorder
- type MockContext
- type MockContextMockRecorder
- type MockListener
- type MockListenerMockRecorder
- type MockProducer
- type MockProducerMockRecorder
- type Producer
- type PublishingTypes
Constants ¶
const (
Delay = 2 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection[T ConnectionTypes] interface { Context() Context Connect() (T, error) Close() }
type ConnectionDialer ¶
type ConnectionDialer[T ConnectionTypes] func(url string) (T, error)
type ConnectionTypes ¶
type ConnectionTypes interface { *amqp.Connection | *stream.Environment IsClosed() bool Close() error }
type Listener ¶
type Listener[T ListenerTypes] interface { OnMessage(ctx context.Context, message T) error }
type MockConnection ¶
type MockConnection[T ConnectionTypes] struct { // contains filtered or unexported fields }
MockConnection is a mock of Connection interface.
func NewMockConnection ¶
func NewMockConnection[T ConnectionTypes](ctrl *gomock.Controller) *MockConnection[T]
NewMockConnection creates a new mock instance.
func (*MockConnection[T]) Connect ¶
func (m *MockConnection[T]) Connect() (T, error)
Connect mocks base method.
func (*MockConnection[T]) Context ¶
func (m *MockConnection[T]) Context() Context
Context mocks base method.
func (*MockConnection[T]) EXPECT ¶
func (m *MockConnection[T]) EXPECT() *MockConnectionMockRecorder[T]
EXPECT returns an object that allows the caller to indicate expected use.
type MockConnectionMockRecorder ¶
type MockConnectionMockRecorder[T ConnectionTypes] struct { // contains filtered or unexported fields }
MockConnectionMockRecorder is the mock recorder for MockConnection.
func (*MockConnectionMockRecorder[T]) Close ¶
func (mr *MockConnectionMockRecorder[T]) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockConnectionMockRecorder[T]) Connect ¶
func (mr *MockConnectionMockRecorder[T]) Connect() *gomock.Call
Connect indicates an expected call of Connect.
func (*MockConnectionMockRecorder[T]) Context ¶
func (mr *MockConnectionMockRecorder[T]) Context() *gomock.Call
Context indicates an expected call of Context.
type MockConsumer ¶
type MockConsumer struct {
// contains filtered or unexported fields
}
MockConsumer is a mock of Consumer interface.
func NewMockConsumer ¶
func NewMockConsumer(ctrl *gomock.Controller) *MockConsumer
NewMockConsumer creates a new mock instance.
func (*MockConsumer) Consume ¶
func (m *MockConsumer) Consume(ctx context.Context) (Event, error)
Consume mocks base method.
func (*MockConsumer) EXPECT ¶
func (m *MockConsumer) EXPECT() *MockConsumerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockConsumer) Set ¶
func (m *MockConsumer) Set(property string, value any)
Set mocks base method.
type MockConsumerMockRecorder ¶
type MockConsumerMockRecorder struct {
// contains filtered or unexported fields
}
MockConsumerMockRecorder is the mock recorder for MockConsumer.
func (*MockConsumerMockRecorder) Close ¶
func (mr *MockConsumerMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockConsumerMockRecorder) Consume ¶
func (mr *MockConsumerMockRecorder) Consume(ctx any) *gomock.Call
Consume indicates an expected call of Consume.
func (*MockConsumerMockRecorder) Context ¶
func (mr *MockConsumerMockRecorder) Context() *gomock.Call
Context indicates an expected call of Context.
type MockContext ¶
type MockContext struct {
// contains filtered or unexported fields
}
MockContext is a mock of Context interface.
func NewMockContext ¶
func NewMockContext(ctrl *gomock.Controller) *MockContext
NewMockContext creates a new mock instance.
func (*MockContext) EXPECT ¶
func (m *MockContext) EXPECT() *MockContextMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockContextMockRecorder ¶
type MockContextMockRecorder struct {
// contains filtered or unexported fields
}
MockContextMockRecorder is the mock recorder for MockContext.
func (*MockContextMockRecorder) Server ¶
func (mr *MockContextMockRecorder) Server() *gomock.Call
Server indicates an expected call of Server.
func (*MockContextMockRecorder) Set ¶
func (mr *MockContextMockRecorder) Set(property, value any) *gomock.Call
Set indicates an expected call of Set.
func (*MockContextMockRecorder) Url ¶
func (mr *MockContextMockRecorder) Url() *gomock.Call
Url indicates an expected call of Url.
type MockListener ¶
type MockListener[T ListenerTypes] struct { // contains filtered or unexported fields }
MockListener is a mock of Listener interface.
func NewMockListener ¶
func NewMockListener[T ListenerTypes](ctrl *gomock.Controller) *MockListener[T]
NewMockListener creates a new mock instance.
func (*MockListener[T]) EXPECT ¶
func (m *MockListener[T]) EXPECT() *MockListenerMockRecorder[T]
EXPECT returns an object that allows the caller to indicate expected use.
type MockListenerMockRecorder ¶
type MockListenerMockRecorder[T ListenerTypes] struct { // contains filtered or unexported fields }
MockListenerMockRecorder is the mock recorder for MockListener.
type MockProducer ¶
type MockProducer[T PublishingTypes] struct { // contains filtered or unexported fields }
MockProducer is a mock of Producer interface.
func NewMockProducer ¶
func NewMockProducer[T PublishingTypes](ctrl *gomock.Controller) *MockProducer[T]
NewMockProducer creates a new mock instance.
func (*MockProducer[T]) Context ¶
func (m *MockProducer[T]) Context() Context
Context mocks base method.
func (*MockProducer[T]) EXPECT ¶
func (m *MockProducer[T]) EXPECT() *MockProducerMockRecorder[T]
EXPECT returns an object that allows the caller to indicate expected use.
type MockProducerMockRecorder ¶
type MockProducerMockRecorder[T PublishingTypes] struct { // contains filtered or unexported fields }
MockProducerMockRecorder is the mock recorder for MockProducer.
func (*MockProducerMockRecorder[T]) Close ¶
func (mr *MockProducerMockRecorder[T]) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockProducerMockRecorder[T]) Context ¶
func (mr *MockProducerMockRecorder[T]) Context() *gomock.Call
Context indicates an expected call of Context.
type Producer ¶
type Producer[T PublishingTypes] interface { Context() Context Produce(ctx context.Context, message T) error Close() }
type PublishingTypes ¶
type PublishingTypes interface { *amqp.Publishing | *samqp.AMQP10 }