elinuxhenrik | 6f5d3d1 | 2021-12-23 16:36:31 +0100 | [diff] [blame] | 1 | // Code generated by mockery v1.0.0. DO NOT EDIT. |
| 2 | |
| 3 | package mocks |
| 4 | |
| 5 | import ( |
| 6 | kafka "github.com/confluentinc/confluent-kafka-go/kafka" |
| 7 | |
| 8 | mock "github.com/stretchr/testify/mock" |
| 9 | |
| 10 | time "time" |
| 11 | ) |
| 12 | |
| 13 | // KafkaConsumer is an autogenerated mock type for the KafkaConsumer type |
| 14 | type KafkaConsumer struct { |
| 15 | mock.Mock |
| 16 | } |
| 17 | |
| 18 | // Commit provides a mock function with given fields: |
| 19 | func (_m KafkaConsumer) Commit() ([]kafka.TopicPartition, error) { |
| 20 | ret := _m.Called() |
| 21 | |
| 22 | var r0 []kafka.TopicPartition |
| 23 | if rf, ok := ret.Get(0).(func() []kafka.TopicPartition); ok { |
| 24 | r0 = rf() |
| 25 | } else { |
| 26 | if ret.Get(0) != nil { |
| 27 | r0 = ret.Get(0).([]kafka.TopicPartition) |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | var r1 error |
| 32 | if rf, ok := ret.Get(1).(func() error); ok { |
| 33 | r1 = rf() |
| 34 | } else { |
| 35 | r1 = ret.Error(1) |
| 36 | } |
| 37 | |
| 38 | return r0, r1 |
| 39 | } |
| 40 | |
| 41 | // ReadMessage provides a mock function with given fields: timeout |
| 42 | func (_m KafkaConsumer) ReadMessage(timeout time.Duration) (*kafka.Message, error) { |
| 43 | ret := _m.Called(timeout) |
| 44 | |
| 45 | var r0 *kafka.Message |
| 46 | if rf, ok := ret.Get(0).(func(time.Duration) *kafka.Message); ok { |
| 47 | r0 = rf(timeout) |
| 48 | } else { |
| 49 | if ret.Get(0) != nil { |
| 50 | r0 = ret.Get(0).(*kafka.Message) |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | var r1 error |
| 55 | if rf, ok := ret.Get(1).(func(time.Duration) error); ok { |
| 56 | r1 = rf(timeout) |
| 57 | } else { |
| 58 | r1 = ret.Error(1) |
| 59 | } |
| 60 | |
| 61 | return r0, r1 |
| 62 | } |
| 63 | |
| 64 | // Subscribe provides a mock function with given fields: topic |
| 65 | func (_m KafkaConsumer) Subscribe(topic string) error { |
| 66 | ret := _m.Called(topic) |
| 67 | |
| 68 | var r0 error |
| 69 | if rf, ok := ret.Get(0).(func(string) error); ok { |
| 70 | r0 = rf(topic) |
| 71 | } else { |
| 72 | r0 = ret.Error(0) |
| 73 | } |
| 74 | |
| 75 | return r0 |
| 76 | } |