| // Code generated by mockery v1.0.0. DO NOT EDIT. |
| |
| package mocks |
| |
| import ( |
| kafka "github.com/confluentinc/confluent-kafka-go/kafka" |
| |
| mock "github.com/stretchr/testify/mock" |
| |
| time "time" |
| ) |
| |
| // KafkaConsumer is an autogenerated mock type for the KafkaConsumer type |
| type KafkaConsumer struct { |
| mock.Mock |
| } |
| |
| // Commit provides a mock function with given fields: |
| func (_m KafkaConsumer) Commit() ([]kafka.TopicPartition, error) { |
| ret := _m.Called() |
| |
| var r0 []kafka.TopicPartition |
| if rf, ok := ret.Get(0).(func() []kafka.TopicPartition); ok { |
| r0 = rf() |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).([]kafka.TopicPartition) |
| } |
| } |
| |
| var r1 error |
| if rf, ok := ret.Get(1).(func() error); ok { |
| r1 = rf() |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // ReadMessage provides a mock function with given fields: timeout |
| func (_m KafkaConsumer) ReadMessage(timeout time.Duration) (*kafka.Message, error) { |
| ret := _m.Called(timeout) |
| |
| var r0 *kafka.Message |
| if rf, ok := ret.Get(0).(func(time.Duration) *kafka.Message); ok { |
| r0 = rf(timeout) |
| } else { |
| if ret.Get(0) != nil { |
| r0 = ret.Get(0).(*kafka.Message) |
| } |
| } |
| |
| var r1 error |
| if rf, ok := ret.Get(1).(func(time.Duration) error); ok { |
| r1 = rf(timeout) |
| } else { |
| r1 = ret.Error(1) |
| } |
| |
| return r0, r1 |
| } |
| |
| // Subscribe provides a mock function with given fields: topic |
| func (_m KafkaConsumer) Subscribe(topic string) error { |
| ret := _m.Called(topic) |
| |
| var r0 error |
| if rf, ok := ret.Get(0).(func(string) error); ok { |
| r0 = rf(topic) |
| } else { |
| r0 = ret.Error(0) |
| } |
| |
| return r0 |
| } |