mocks

package
v2.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	mock.Mock
}

Channel is an autogenerated mock type for the Channel type

func NewChannel

func NewChannel(t mockConstructorTestingTNewChannel) *Channel

NewChannel creates a new instance of Channel. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Channel) Close

func (_m *Channel) Close() error

Close provides a mock function with given fields:

func (*Channel) Consume

func (_m *Channel) Consume(queue string, consumer string, autoAck bool, exclusive bool, noLocal bool, noWait bool, args amqp091.Table) (<-chan amqp091.Delivery, error)

Consume provides a mock function with given fields: queue, consumer, autoAck, exclusive, noLocal, noWait, args

func (*Channel) ExchangeDeclare

func (_m *Channel) ExchangeDeclare(name string, kind string, durable bool, autoDelete bool, internal bool, noWait bool, args amqp091.Table) error

ExchangeDeclare provides a mock function with given fields: name, kind, durable, autoDelete, internal, noWait, args

func (*Channel) NotifyClose

func (_m *Channel) NotifyClose(receiver chan *amqp091.Error) chan *amqp091.Error

NotifyClose provides a mock function with given fields: receiver

func (*Channel) Publish

func (_m *Channel) Publish(exchange string, key string, mandatory bool, immediate bool, msg amqp091.Publishing) error

Publish provides a mock function with given fields: exchange, key, mandatory, immediate, msg

func (*Channel) Qos

func (_m *Channel) Qos(prefetchCount int, prefetchSize int, global bool) error

Qos provides a mock function with given fields: prefetchCount, prefetchSize, global

func (*Channel) QueueBind

func (_m *Channel) QueueBind(name string, key string, exchange string, noWait bool, args amqp091.Table) error

QueueBind provides a mock function with given fields: name, key, exchange, noWait, args

func (*Channel) QueueDeclare

func (_m *Channel) QueueDeclare(name string, durable bool, autoDelete bool, exclusive bool, noWait bool, args amqp091.Table) (amqp091.Queue, error)

QueueDeclare provides a mock function with given fields: name, durable, autoDelete, exclusive, noWait, args

type ChannelSimple

type ChannelSimple struct {
	CloseFunc           func() error
	ConsumeFunc         func(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table) (<-chan amqp.Delivery, error)
	ExchangeDeclareFunc func(name, kind string, durable, autoDelete, internal, noWait bool, args amqp.Table) error
	NotifyCloseFunc     func(receiver chan *amqp.Error) chan *amqp.Error
	PublishFunc         func(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error
	QosFunc             func(prefetchCount int, prefetchSize int, global bool) error
	QueueBindFunc       func(name, key, exchange string, noWait bool, args amqp.Table) error
	QueueDeclareFunc    func(name string, durable, autoDelete, exclusive, noWait bool, args amqp.Table) (amqp.Queue, error)
}

ChannelSimple mocks the Channel type.

func (*ChannelSimple) Close

func (c *ChannelSimple) Close() error

Close mocks the Channel.Close() method.

func (*ChannelSimple) Consume

func (c *ChannelSimple) Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args amqp.Table) (<-chan amqp.Delivery, error)

Consume mocks the Channel.Consume() method.

func (*ChannelSimple) ExchangeDeclare

func (c *ChannelSimple) ExchangeDeclare(name, kind string, durable, autoDelete, internal, noWait bool, args amqp.Table) error

ExchangeDeclare mocks the Channel.ExchangeDeclare() method.

func (*ChannelSimple) NotifyClose

func (c *ChannelSimple) NotifyClose(receiver chan *amqp.Error) chan *amqp.Error

NotifyClose mocks the Channel.NotifyClose() method.

func (*ChannelSimple) Publish

func (c *ChannelSimple) Publish(exchange, key string, mandatory, immediate bool, msg amqp.Publishing) error

Publish mocks the Channel.Publish() method. nolint:gocritic // this is a mock.

func (*ChannelSimple) Qos

func (c *ChannelSimple) Qos(prefetchCount, prefetchSize int, global bool) error

Qos mocks the Channel.Qos() method.

func (*ChannelSimple) QueueBind

func (c *ChannelSimple) QueueBind(name, key, exchange string, noWait bool, args amqp.Table) error

QueueBind mocks the Channel.QueueBind() method.

func (*ChannelSimple) QueueDeclare

func (c *ChannelSimple) QueueDeclare(name string, durable, autoDelete, exclusive, noWait bool, args amqp.Table) (amqp.Queue, error)

QueueDeclare mocks the Channel.QueueDeclare() method.

type RabbitMQ

type RabbitMQ struct {
	mock.Mock
}

RabbitMQ is an autogenerated mock type for the RabbitMQ type

func NewRabbitMQ

func NewRabbitMQ(t mockConstructorTestingTNewRabbitMQ) *RabbitMQ

NewRabbitMQ creates a new instance of RabbitMQ. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*RabbitMQ) Channel

func (_m *RabbitMQ) Channel() (harego.Channel, error)

Channel provides a mock function with given fields:

func (*RabbitMQ) Close

func (_m *RabbitMQ) Close() error

Close provides a mock function with given fields:

type RabbitMQSimple

type RabbitMQSimple struct {
	ChannelFunc func() (harego.Channel, error)
	CloseFunc   func() error
}

RabbitMQSimple is a simple mock type for the RabbitMQ.

func (*RabbitMQSimple) Channel

func (r *RabbitMQSimple) Channel() (harego.Channel, error)

Channel mocks the RabbitMQ.Channel() method.

func (*RabbitMQSimple) Close

func (r *RabbitMQSimple) Close() error

Close mocks the RabbitMQ.Close() method.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL