diff --git a/context_test.go b/context_test.go index 973c173b..02168c97 100644 --- a/context_test.go +++ b/context_test.go @@ -10,10 +10,9 @@ import ( "time" "github.com/IBM/sarama" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - "github.com/lovoo/goka/codec" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" ) func newEmitter(err error, done func(err error)) emitter { diff --git a/emitter_test.go b/emitter_test.go index fb54158e..83488a2f 100644 --- a/emitter_test.go +++ b/emitter_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" "github.com/lovoo/goka/codec" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" ) var ( diff --git a/go.mod b/go.mod index 536d559e..4f3826b1 100644 --- a/go.mod +++ b/go.mod @@ -5,11 +5,11 @@ go 1.20 require ( github.com/IBM/sarama v1.41.3 github.com/go-stack/stack v1.8.1 - github.com/golang/mock v1.6.0 github.com/gorilla/mux v1.8.0 github.com/hashicorp/go-multierror v1.1.1 github.com/stretchr/testify v1.8.4 github.com/syndtr/goleveldb v1.0.0 + go.uber.org/mock v0.4.0 golang.org/x/sync v0.4.0 gopkg.in/redis.v5 v5.2.9 gopkg.in/yaml.v2 v2.4.0 diff --git a/go.sum b/go.sum index 744021a1..e2e29f56 100644 --- a/go.sum +++ b/go.sum @@ -14,8 +14,6 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8 github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= @@ -75,22 +73,19 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= +go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= -golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -98,16 +93,12 @@ golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -123,11 +114,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= diff --git a/mockbuilder.go b/mockbuilder.go index b06f441d..6302990c 100644 --- a/mockbuilder.go +++ b/mockbuilder.go @@ -6,9 +6,8 @@ import ( "hash" "testing" - "github.com/golang/mock/gomock" - "github.com/lovoo/goka/storage" + "go.uber.org/mock/gomock" ) var ( diff --git a/mockcontroller.go b/mockcontroller.go index 9fc0e76f..c40c1781 100644 --- a/mockcontroller.go +++ b/mockcontroller.go @@ -3,7 +3,7 @@ package goka import ( "fmt" - "github.com/golang/mock/gomock" + "go.uber.org/mock/gomock" ) type gomockPanicker struct { diff --git a/mocks.go b/mocks.go index 2156a138..149fb0fd 100644 --- a/mocks.go +++ b/mocks.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/lovoo/goka (interfaces: TopicManager,Producer,Broker) +// +// Generated by this command: +// +// mockgen -self_package github.com/lovoo/goka -package goka -destination mocks.go github.com/lovoo/goka TopicManager,Producer,Broker +// // Package goka is a generated GoMock package. package goka @@ -8,13 +13,14 @@ import ( reflect "reflect" sarama "github.com/IBM/sarama" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockTopicManager is a mock of TopicManager interface. type MockTopicManager struct { ctrl *gomock.Controller recorder *MockTopicManagerMockRecorder + isgomock struct{} } // MockTopicManagerMockRecorder is the mock recorder for MockTopicManager. @@ -49,81 +55,82 @@ func (mr *MockTopicManagerMockRecorder) Close() *gomock.Call { } // EnsureStreamExists mocks base method. -func (m *MockTopicManager) EnsureStreamExists(arg0 string, arg1 int) error { +func (m *MockTopicManager) EnsureStreamExists(topic string, npar int) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnsureStreamExists", arg0, arg1) + ret := m.ctrl.Call(m, "EnsureStreamExists", topic, npar) ret0, _ := ret[0].(error) return ret0 } // EnsureStreamExists indicates an expected call of EnsureStreamExists. -func (mr *MockTopicManagerMockRecorder) EnsureStreamExists(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockTopicManagerMockRecorder) EnsureStreamExists(topic, npar any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureStreamExists", reflect.TypeOf((*MockTopicManager)(nil).EnsureStreamExists), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureStreamExists", reflect.TypeOf((*MockTopicManager)(nil).EnsureStreamExists), topic, npar) } // EnsureTableExists mocks base method. -func (m *MockTopicManager) EnsureTableExists(arg0 string, arg1 int) error { +func (m *MockTopicManager) EnsureTableExists(topic string, npar int) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnsureTableExists", arg0, arg1) + ret := m.ctrl.Call(m, "EnsureTableExists", topic, npar) ret0, _ := ret[0].(error) return ret0 } // EnsureTableExists indicates an expected call of EnsureTableExists. -func (mr *MockTopicManagerMockRecorder) EnsureTableExists(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockTopicManagerMockRecorder) EnsureTableExists(topic, npar any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureTableExists", reflect.TypeOf((*MockTopicManager)(nil).EnsureTableExists), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureTableExists", reflect.TypeOf((*MockTopicManager)(nil).EnsureTableExists), topic, npar) } // EnsureTopicExists mocks base method. -func (m *MockTopicManager) EnsureTopicExists(arg0 string, arg1, arg2 int, arg3 map[string]string) error { +func (m *MockTopicManager) EnsureTopicExists(topic string, npar, rfactor int, config map[string]string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EnsureTopicExists", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "EnsureTopicExists", topic, npar, rfactor, config) ret0, _ := ret[0].(error) return ret0 } // EnsureTopicExists indicates an expected call of EnsureTopicExists. -func (mr *MockTopicManagerMockRecorder) EnsureTopicExists(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockTopicManagerMockRecorder) EnsureTopicExists(topic, npar, rfactor, config any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureTopicExists", reflect.TypeOf((*MockTopicManager)(nil).EnsureTopicExists), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureTopicExists", reflect.TypeOf((*MockTopicManager)(nil).EnsureTopicExists), topic, npar, rfactor, config) } // GetOffset mocks base method. -func (m *MockTopicManager) GetOffset(arg0 string, arg1 int32, arg2 int64) (int64, error) { +func (m *MockTopicManager) GetOffset(topic string, partitionID int32, time int64) (int64, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetOffset", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "GetOffset", topic, partitionID, time) ret0, _ := ret[0].(int64) ret1, _ := ret[1].(error) return ret0, ret1 } // GetOffset indicates an expected call of GetOffset. -func (mr *MockTopicManagerMockRecorder) GetOffset(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockTopicManagerMockRecorder) GetOffset(topic, partitionID, time any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOffset", reflect.TypeOf((*MockTopicManager)(nil).GetOffset), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOffset", reflect.TypeOf((*MockTopicManager)(nil).GetOffset), topic, partitionID, time) } // Partitions mocks base method. -func (m *MockTopicManager) Partitions(arg0 string) ([]int32, error) { +func (m *MockTopicManager) Partitions(topic string) ([]int32, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Partitions", arg0) + ret := m.ctrl.Call(m, "Partitions", topic) ret0, _ := ret[0].([]int32) ret1, _ := ret[1].(error) return ret0, ret1 } // Partitions indicates an expected call of Partitions. -func (mr *MockTopicManagerMockRecorder) Partitions(arg0 interface{}) *gomock.Call { +func (mr *MockTopicManagerMockRecorder) Partitions(topic any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Partitions", reflect.TypeOf((*MockTopicManager)(nil).Partitions), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Partitions", reflect.TypeOf((*MockTopicManager)(nil).Partitions), topic) } // MockProducer is a mock of Producer interface. type MockProducer struct { ctrl *gomock.Controller recorder *MockProducerMockRecorder + isgomock struct{} } // MockProducerMockRecorder is the mock recorder for MockProducer. @@ -158,37 +165,38 @@ func (mr *MockProducerMockRecorder) Close() *gomock.Call { } // Emit mocks base method. -func (m *MockProducer) Emit(arg0, arg1 string, arg2 []byte) *Promise { +func (m *MockProducer) Emit(topic, key string, value []byte) *Promise { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Emit", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Emit", topic, key, value) ret0, _ := ret[0].(*Promise) return ret0 } // Emit indicates an expected call of Emit. -func (mr *MockProducerMockRecorder) Emit(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockProducerMockRecorder) Emit(topic, key, value any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Emit", reflect.TypeOf((*MockProducer)(nil).Emit), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Emit", reflect.TypeOf((*MockProducer)(nil).Emit), topic, key, value) } // EmitWithHeaders mocks base method. -func (m *MockProducer) EmitWithHeaders(arg0, arg1 string, arg2 []byte, arg3 Headers) *Promise { +func (m *MockProducer) EmitWithHeaders(topic, key string, value []byte, headers Headers) *Promise { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "EmitWithHeaders", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "EmitWithHeaders", topic, key, value, headers) ret0, _ := ret[0].(*Promise) return ret0 } // EmitWithHeaders indicates an expected call of EmitWithHeaders. -func (mr *MockProducerMockRecorder) EmitWithHeaders(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockProducerMockRecorder) EmitWithHeaders(topic, key, value, headers any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EmitWithHeaders", reflect.TypeOf((*MockProducer)(nil).EmitWithHeaders), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EmitWithHeaders", reflect.TypeOf((*MockProducer)(nil).EmitWithHeaders), topic, key, value, headers) } // MockBroker is a mock of Broker interface. type MockBroker struct { ctrl *gomock.Controller recorder *MockBrokerMockRecorder + isgomock struct{} } // MockBrokerMockRecorder is the mock recorder for MockBroker. @@ -238,30 +246,30 @@ func (mr *MockBrokerMockRecorder) Connected() *gomock.Call { } // CreateTopics mocks base method. -func (m *MockBroker) CreateTopics(arg0 *sarama.CreateTopicsRequest) (*sarama.CreateTopicsResponse, error) { +func (m *MockBroker) CreateTopics(request *sarama.CreateTopicsRequest) (*sarama.CreateTopicsResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateTopics", arg0) + ret := m.ctrl.Call(m, "CreateTopics", request) ret0, _ := ret[0].(*sarama.CreateTopicsResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // CreateTopics indicates an expected call of CreateTopics. -func (mr *MockBrokerMockRecorder) CreateTopics(arg0 interface{}) *gomock.Call { +func (mr *MockBrokerMockRecorder) CreateTopics(request any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTopics", reflect.TypeOf((*MockBroker)(nil).CreateTopics), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTopics", reflect.TypeOf((*MockBroker)(nil).CreateTopics), request) } // Open mocks base method. -func (m *MockBroker) Open(arg0 *sarama.Config) error { +func (m *MockBroker) Open(conf *sarama.Config) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Open", arg0) + ret := m.ctrl.Call(m, "Open", conf) ret0, _ := ret[0].(error) return ret0 } // Open indicates an expected call of Open. -func (mr *MockBrokerMockRecorder) Open(arg0 interface{}) *gomock.Call { +func (mr *MockBrokerMockRecorder) Open(conf any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockBroker)(nil).Open), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Open", reflect.TypeOf((*MockBroker)(nil).Open), conf) } diff --git a/mockssarama.go b/mockssarama.go index 8eb6d673..75db7a3c 100644 --- a/mockssarama.go +++ b/mockssarama.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/IBM/sarama (interfaces: Client,ClusterAdmin) +// +// Generated by this command: +// +// mockgen -self_package github.com/lovoo/goka -package goka -destination mockssarama.go github.com/IBM/sarama Client,ClusterAdmin +// // Package goka is a generated GoMock package. package goka @@ -8,13 +13,14 @@ import ( reflect "reflect" sarama "github.com/IBM/sarama" - gomock "github.com/golang/mock/gomock" + gomock "go.uber.org/mock/gomock" ) // MockClient is a mock of Client interface. type MockClient struct { ctrl *gomock.Controller recorder *MockClientMockRecorder + isgomock struct{} } // MockClientMockRecorder is the mock recorder for MockClient. @@ -35,18 +41,18 @@ func (m *MockClient) EXPECT() *MockClientMockRecorder { } // Broker mocks base method. -func (m *MockClient) Broker(arg0 int32) (*sarama.Broker, error) { +func (m *MockClient) Broker(brokerID int32) (*sarama.Broker, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Broker", arg0) + ret := m.ctrl.Call(m, "Broker", brokerID) ret0, _ := ret[0].(*sarama.Broker) ret1, _ := ret[1].(error) return ret0, ret1 } // Broker indicates an expected call of Broker. -func (mr *MockClientMockRecorder) Broker(arg0 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) Broker(brokerID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Broker", reflect.TypeOf((*MockClient)(nil).Broker), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Broker", reflect.TypeOf((*MockClient)(nil).Broker), brokerID) } // Brokers mocks base method. @@ -121,48 +127,48 @@ func (mr *MockClientMockRecorder) Controller() *gomock.Call { } // Coordinator mocks base method. -func (m *MockClient) Coordinator(arg0 string) (*sarama.Broker, error) { +func (m *MockClient) Coordinator(consumerGroup string) (*sarama.Broker, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Coordinator", arg0) + ret := m.ctrl.Call(m, "Coordinator", consumerGroup) ret0, _ := ret[0].(*sarama.Broker) ret1, _ := ret[1].(error) return ret0, ret1 } // Coordinator indicates an expected call of Coordinator. -func (mr *MockClientMockRecorder) Coordinator(arg0 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) Coordinator(consumerGroup any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Coordinator", reflect.TypeOf((*MockClient)(nil).Coordinator), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Coordinator", reflect.TypeOf((*MockClient)(nil).Coordinator), consumerGroup) } // GetOffset mocks base method. -func (m *MockClient) GetOffset(arg0 string, arg1 int32, arg2 int64) (int64, error) { +func (m *MockClient) GetOffset(topic string, partitionID int32, time int64) (int64, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetOffset", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "GetOffset", topic, partitionID, time) ret0, _ := ret[0].(int64) ret1, _ := ret[1].(error) return ret0, ret1 } // GetOffset indicates an expected call of GetOffset. -func (mr *MockClientMockRecorder) GetOffset(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) GetOffset(topic, partitionID, time any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOffset", reflect.TypeOf((*MockClient)(nil).GetOffset), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOffset", reflect.TypeOf((*MockClient)(nil).GetOffset), topic, partitionID, time) } // InSyncReplicas mocks base method. -func (m *MockClient) InSyncReplicas(arg0 string, arg1 int32) ([]int32, error) { +func (m *MockClient) InSyncReplicas(topic string, partitionID int32) ([]int32, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "InSyncReplicas", arg0, arg1) + ret := m.ctrl.Call(m, "InSyncReplicas", topic, partitionID) ret0, _ := ret[0].([]int32) ret1, _ := ret[1].(error) return ret0, ret1 } // InSyncReplicas indicates an expected call of InSyncReplicas. -func (mr *MockClientMockRecorder) InSyncReplicas(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) InSyncReplicas(topic, partitionID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InSyncReplicas", reflect.TypeOf((*MockClient)(nil).InSyncReplicas), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "InSyncReplicas", reflect.TypeOf((*MockClient)(nil).InSyncReplicas), topic, partitionID) } // InitProducerID mocks base method. @@ -181,24 +187,24 @@ func (mr *MockClientMockRecorder) InitProducerID() *gomock.Call { } // Leader mocks base method. -func (m *MockClient) Leader(arg0 string, arg1 int32) (*sarama.Broker, error) { +func (m *MockClient) Leader(topic string, partitionID int32) (*sarama.Broker, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Leader", arg0, arg1) + ret := m.ctrl.Call(m, "Leader", topic, partitionID) ret0, _ := ret[0].(*sarama.Broker) ret1, _ := ret[1].(error) return ret0, ret1 } // Leader indicates an expected call of Leader. -func (mr *MockClientMockRecorder) Leader(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) Leader(topic, partitionID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leader", reflect.TypeOf((*MockClient)(nil).Leader), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Leader", reflect.TypeOf((*MockClient)(nil).Leader), topic, partitionID) } // LeaderAndEpoch mocks base method. -func (m *MockClient) LeaderAndEpoch(arg0 string, arg1 int32) (*sarama.Broker, int32, error) { +func (m *MockClient) LeaderAndEpoch(topic string, partitionID int32) (*sarama.Broker, int32, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "LeaderAndEpoch", arg0, arg1) + ret := m.ctrl.Call(m, "LeaderAndEpoch", topic, partitionID) ret0, _ := ret[0].(*sarama.Broker) ret1, _ := ret[1].(int32) ret2, _ := ret[2].(error) @@ -206,9 +212,9 @@ func (m *MockClient) LeaderAndEpoch(arg0 string, arg1 int32) (*sarama.Broker, in } // LeaderAndEpoch indicates an expected call of LeaderAndEpoch. -func (mr *MockClientMockRecorder) LeaderAndEpoch(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) LeaderAndEpoch(topic, partitionID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaderAndEpoch", reflect.TypeOf((*MockClient)(nil).LeaderAndEpoch), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LeaderAndEpoch", reflect.TypeOf((*MockClient)(nil).LeaderAndEpoch), topic, partitionID) } // LeastLoadedBroker mocks base method. @@ -226,47 +232,47 @@ func (mr *MockClientMockRecorder) LeastLoadedBroker() *gomock.Call { } // OfflineReplicas mocks base method. -func (m *MockClient) OfflineReplicas(arg0 string, arg1 int32) ([]int32, error) { +func (m *MockClient) OfflineReplicas(topic string, partitionID int32) ([]int32, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "OfflineReplicas", arg0, arg1) + ret := m.ctrl.Call(m, "OfflineReplicas", topic, partitionID) ret0, _ := ret[0].([]int32) ret1, _ := ret[1].(error) return ret0, ret1 } // OfflineReplicas indicates an expected call of OfflineReplicas. -func (mr *MockClientMockRecorder) OfflineReplicas(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) OfflineReplicas(topic, partitionID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfflineReplicas", reflect.TypeOf((*MockClient)(nil).OfflineReplicas), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OfflineReplicas", reflect.TypeOf((*MockClient)(nil).OfflineReplicas), topic, partitionID) } // Partitions mocks base method. -func (m *MockClient) Partitions(arg0 string) ([]int32, error) { +func (m *MockClient) Partitions(topic string) ([]int32, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Partitions", arg0) + ret := m.ctrl.Call(m, "Partitions", topic) ret0, _ := ret[0].([]int32) ret1, _ := ret[1].(error) return ret0, ret1 } // Partitions indicates an expected call of Partitions. -func (mr *MockClientMockRecorder) Partitions(arg0 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) Partitions(topic any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Partitions", reflect.TypeOf((*MockClient)(nil).Partitions), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Partitions", reflect.TypeOf((*MockClient)(nil).Partitions), topic) } // RefreshBrokers mocks base method. -func (m *MockClient) RefreshBrokers(arg0 []string) error { +func (m *MockClient) RefreshBrokers(addrs []string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RefreshBrokers", arg0) + ret := m.ctrl.Call(m, "RefreshBrokers", addrs) ret0, _ := ret[0].(error) return ret0 } // RefreshBrokers indicates an expected call of RefreshBrokers. -func (mr *MockClientMockRecorder) RefreshBrokers(arg0 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) RefreshBrokers(addrs any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshBrokers", reflect.TypeOf((*MockClient)(nil).RefreshBrokers), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshBrokers", reflect.TypeOf((*MockClient)(nil).RefreshBrokers), addrs) } // RefreshController mocks base method. @@ -285,24 +291,24 @@ func (mr *MockClientMockRecorder) RefreshController() *gomock.Call { } // RefreshCoordinator mocks base method. -func (m *MockClient) RefreshCoordinator(arg0 string) error { +func (m *MockClient) RefreshCoordinator(consumerGroup string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RefreshCoordinator", arg0) + ret := m.ctrl.Call(m, "RefreshCoordinator", consumerGroup) ret0, _ := ret[0].(error) return ret0 } // RefreshCoordinator indicates an expected call of RefreshCoordinator. -func (mr *MockClientMockRecorder) RefreshCoordinator(arg0 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) RefreshCoordinator(consumerGroup any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshCoordinator", reflect.TypeOf((*MockClient)(nil).RefreshCoordinator), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshCoordinator", reflect.TypeOf((*MockClient)(nil).RefreshCoordinator), consumerGroup) } // RefreshMetadata mocks base method. -func (m *MockClient) RefreshMetadata(arg0 ...string) error { +func (m *MockClient) RefreshMetadata(topics ...string) error { m.ctrl.T.Helper() - varargs := []interface{}{} - for _, a := range arg0 { + varargs := []any{} + for _, a := range topics { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "RefreshMetadata", varargs...) @@ -311,38 +317,38 @@ func (m *MockClient) RefreshMetadata(arg0 ...string) error { } // RefreshMetadata indicates an expected call of RefreshMetadata. -func (mr *MockClientMockRecorder) RefreshMetadata(arg0 ...interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) RefreshMetadata(topics ...any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshMetadata", reflect.TypeOf((*MockClient)(nil).RefreshMetadata), arg0...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshMetadata", reflect.TypeOf((*MockClient)(nil).RefreshMetadata), topics...) } // RefreshTransactionCoordinator mocks base method. -func (m *MockClient) RefreshTransactionCoordinator(arg0 string) error { +func (m *MockClient) RefreshTransactionCoordinator(transactionID string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RefreshTransactionCoordinator", arg0) + ret := m.ctrl.Call(m, "RefreshTransactionCoordinator", transactionID) ret0, _ := ret[0].(error) return ret0 } // RefreshTransactionCoordinator indicates an expected call of RefreshTransactionCoordinator. -func (mr *MockClientMockRecorder) RefreshTransactionCoordinator(arg0 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) RefreshTransactionCoordinator(transactionID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshTransactionCoordinator", reflect.TypeOf((*MockClient)(nil).RefreshTransactionCoordinator), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RefreshTransactionCoordinator", reflect.TypeOf((*MockClient)(nil).RefreshTransactionCoordinator), transactionID) } // Replicas mocks base method. -func (m *MockClient) Replicas(arg0 string, arg1 int32) ([]int32, error) { +func (m *MockClient) Replicas(topic string, partitionID int32) ([]int32, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Replicas", arg0, arg1) + ret := m.ctrl.Call(m, "Replicas", topic, partitionID) ret0, _ := ret[0].([]int32) ret1, _ := ret[1].(error) return ret0, ret1 } // Replicas indicates an expected call of Replicas. -func (mr *MockClientMockRecorder) Replicas(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) Replicas(topic, partitionID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Replicas", reflect.TypeOf((*MockClient)(nil).Replicas), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Replicas", reflect.TypeOf((*MockClient)(nil).Replicas), topic, partitionID) } // Topics mocks base method. @@ -361,39 +367,40 @@ func (mr *MockClientMockRecorder) Topics() *gomock.Call { } // TransactionCoordinator mocks base method. -func (m *MockClient) TransactionCoordinator(arg0 string) (*sarama.Broker, error) { +func (m *MockClient) TransactionCoordinator(transactionID string) (*sarama.Broker, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "TransactionCoordinator", arg0) + ret := m.ctrl.Call(m, "TransactionCoordinator", transactionID) ret0, _ := ret[0].(*sarama.Broker) ret1, _ := ret[1].(error) return ret0, ret1 } // TransactionCoordinator indicates an expected call of TransactionCoordinator. -func (mr *MockClientMockRecorder) TransactionCoordinator(arg0 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) TransactionCoordinator(transactionID any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransactionCoordinator", reflect.TypeOf((*MockClient)(nil).TransactionCoordinator), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TransactionCoordinator", reflect.TypeOf((*MockClient)(nil).TransactionCoordinator), transactionID) } // WritablePartitions mocks base method. -func (m *MockClient) WritablePartitions(arg0 string) ([]int32, error) { +func (m *MockClient) WritablePartitions(topic string) ([]int32, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "WritablePartitions", arg0) + ret := m.ctrl.Call(m, "WritablePartitions", topic) ret0, _ := ret[0].([]int32) ret1, _ := ret[1].(error) return ret0, ret1 } // WritablePartitions indicates an expected call of WritablePartitions. -func (mr *MockClientMockRecorder) WritablePartitions(arg0 interface{}) *gomock.Call { +func (mr *MockClientMockRecorder) WritablePartitions(topic any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WritablePartitions", reflect.TypeOf((*MockClient)(nil).WritablePartitions), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "WritablePartitions", reflect.TypeOf((*MockClient)(nil).WritablePartitions), topic) } // MockClusterAdmin is a mock of ClusterAdmin interface. type MockClusterAdmin struct { ctrl *gomock.Controller recorder *MockClusterAdminMockRecorder + isgomock struct{} } // MockClusterAdminMockRecorder is the mock recorder for MockClusterAdmin. @@ -414,45 +421,45 @@ func (m *MockClusterAdmin) EXPECT() *MockClusterAdminMockRecorder { } // AlterClientQuotas mocks base method. -func (m *MockClusterAdmin) AlterClientQuotas(arg0 []sarama.QuotaEntityComponent, arg1 sarama.ClientQuotasOp, arg2 bool) error { +func (m *MockClusterAdmin) AlterClientQuotas(entity []sarama.QuotaEntityComponent, op sarama.ClientQuotasOp, validateOnly bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AlterClientQuotas", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "AlterClientQuotas", entity, op, validateOnly) ret0, _ := ret[0].(error) return ret0 } // AlterClientQuotas indicates an expected call of AlterClientQuotas. -func (mr *MockClusterAdminMockRecorder) AlterClientQuotas(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) AlterClientQuotas(entity, op, validateOnly any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AlterClientQuotas", reflect.TypeOf((*MockClusterAdmin)(nil).AlterClientQuotas), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AlterClientQuotas", reflect.TypeOf((*MockClusterAdmin)(nil).AlterClientQuotas), entity, op, validateOnly) } // AlterConfig mocks base method. -func (m *MockClusterAdmin) AlterConfig(arg0 sarama.ConfigResourceType, arg1 string, arg2 map[string]*string, arg3 bool) error { +func (m *MockClusterAdmin) AlterConfig(resourceType sarama.ConfigResourceType, name string, entries map[string]*string, validateOnly bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AlterConfig", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "AlterConfig", resourceType, name, entries, validateOnly) ret0, _ := ret[0].(error) return ret0 } // AlterConfig indicates an expected call of AlterConfig. -func (mr *MockClusterAdminMockRecorder) AlterConfig(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) AlterConfig(resourceType, name, entries, validateOnly any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AlterConfig", reflect.TypeOf((*MockClusterAdmin)(nil).AlterConfig), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AlterConfig", reflect.TypeOf((*MockClusterAdmin)(nil).AlterConfig), resourceType, name, entries, validateOnly) } // AlterPartitionReassignments mocks base method. -func (m *MockClusterAdmin) AlterPartitionReassignments(arg0 string, arg1 [][]int32) error { +func (m *MockClusterAdmin) AlterPartitionReassignments(topic string, assignment [][]int32) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "AlterPartitionReassignments", arg0, arg1) + ret := m.ctrl.Call(m, "AlterPartitionReassignments", topic, assignment) ret0, _ := ret[0].(error) return ret0 } // AlterPartitionReassignments indicates an expected call of AlterPartitionReassignments. -func (mr *MockClusterAdminMockRecorder) AlterPartitionReassignments(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) AlterPartitionReassignments(topic, assignment any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AlterPartitionReassignments", reflect.TypeOf((*MockClusterAdmin)(nil).AlterPartitionReassignments), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AlterPartitionReassignments", reflect.TypeOf((*MockClusterAdmin)(nil).AlterPartitionReassignments), topic, assignment) } // Close mocks base method. @@ -485,17 +492,17 @@ func (mr *MockClusterAdminMockRecorder) Controller() *gomock.Call { } // CreateACL mocks base method. -func (m *MockClusterAdmin) CreateACL(arg0 sarama.Resource, arg1 sarama.Acl) error { +func (m *MockClusterAdmin) CreateACL(resource sarama.Resource, acl sarama.Acl) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateACL", arg0, arg1) + ret := m.ctrl.Call(m, "CreateACL", resource, acl) ret0, _ := ret[0].(error) return ret0 } // CreateACL indicates an expected call of CreateACL. -func (mr *MockClusterAdminMockRecorder) CreateACL(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) CreateACL(resource, acl any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateACL", reflect.TypeOf((*MockClusterAdmin)(nil).CreateACL), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateACL", reflect.TypeOf((*MockClusterAdmin)(nil).CreateACL), resource, acl) } // CreateACLs mocks base method. @@ -507,138 +514,138 @@ func (m *MockClusterAdmin) CreateACLs(arg0 []*sarama.ResourceAcls) error { } // CreateACLs indicates an expected call of CreateACLs. -func (mr *MockClusterAdminMockRecorder) CreateACLs(arg0 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) CreateACLs(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateACLs", reflect.TypeOf((*MockClusterAdmin)(nil).CreateACLs), arg0) } // CreatePartitions mocks base method. -func (m *MockClusterAdmin) CreatePartitions(arg0 string, arg1 int32, arg2 [][]int32, arg3 bool) error { +func (m *MockClusterAdmin) CreatePartitions(topic string, count int32, assignment [][]int32, validateOnly bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreatePartitions", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "CreatePartitions", topic, count, assignment, validateOnly) ret0, _ := ret[0].(error) return ret0 } // CreatePartitions indicates an expected call of CreatePartitions. -func (mr *MockClusterAdminMockRecorder) CreatePartitions(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) CreatePartitions(topic, count, assignment, validateOnly any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePartitions", reflect.TypeOf((*MockClusterAdmin)(nil).CreatePartitions), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreatePartitions", reflect.TypeOf((*MockClusterAdmin)(nil).CreatePartitions), topic, count, assignment, validateOnly) } // CreateTopic mocks base method. -func (m *MockClusterAdmin) CreateTopic(arg0 string, arg1 *sarama.TopicDetail, arg2 bool) error { +func (m *MockClusterAdmin) CreateTopic(topic string, detail *sarama.TopicDetail, validateOnly bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CreateTopic", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "CreateTopic", topic, detail, validateOnly) ret0, _ := ret[0].(error) return ret0 } // CreateTopic indicates an expected call of CreateTopic. -func (mr *MockClusterAdminMockRecorder) CreateTopic(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) CreateTopic(topic, detail, validateOnly any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTopic", reflect.TypeOf((*MockClusterAdmin)(nil).CreateTopic), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateTopic", reflect.TypeOf((*MockClusterAdmin)(nil).CreateTopic), topic, detail, validateOnly) } // DeleteACL mocks base method. -func (m *MockClusterAdmin) DeleteACL(arg0 sarama.AclFilter, arg1 bool) ([]sarama.MatchingAcl, error) { +func (m *MockClusterAdmin) DeleteACL(filter sarama.AclFilter, validateOnly bool) ([]sarama.MatchingAcl, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteACL", arg0, arg1) + ret := m.ctrl.Call(m, "DeleteACL", filter, validateOnly) ret0, _ := ret[0].([]sarama.MatchingAcl) ret1, _ := ret[1].(error) return ret0, ret1 } // DeleteACL indicates an expected call of DeleteACL. -func (mr *MockClusterAdminMockRecorder) DeleteACL(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) DeleteACL(filter, validateOnly any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteACL", reflect.TypeOf((*MockClusterAdmin)(nil).DeleteACL), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteACL", reflect.TypeOf((*MockClusterAdmin)(nil).DeleteACL), filter, validateOnly) } // DeleteConsumerGroup mocks base method. -func (m *MockClusterAdmin) DeleteConsumerGroup(arg0 string) error { +func (m *MockClusterAdmin) DeleteConsumerGroup(group string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteConsumerGroup", arg0) + ret := m.ctrl.Call(m, "DeleteConsumerGroup", group) ret0, _ := ret[0].(error) return ret0 } // DeleteConsumerGroup indicates an expected call of DeleteConsumerGroup. -func (mr *MockClusterAdminMockRecorder) DeleteConsumerGroup(arg0 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) DeleteConsumerGroup(group any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteConsumerGroup", reflect.TypeOf((*MockClusterAdmin)(nil).DeleteConsumerGroup), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteConsumerGroup", reflect.TypeOf((*MockClusterAdmin)(nil).DeleteConsumerGroup), group) } // DeleteConsumerGroupOffset mocks base method. -func (m *MockClusterAdmin) DeleteConsumerGroupOffset(arg0, arg1 string, arg2 int32) error { +func (m *MockClusterAdmin) DeleteConsumerGroupOffset(group, topic string, partition int32) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteConsumerGroupOffset", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "DeleteConsumerGroupOffset", group, topic, partition) ret0, _ := ret[0].(error) return ret0 } // DeleteConsumerGroupOffset indicates an expected call of DeleteConsumerGroupOffset. -func (mr *MockClusterAdminMockRecorder) DeleteConsumerGroupOffset(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) DeleteConsumerGroupOffset(group, topic, partition any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteConsumerGroupOffset", reflect.TypeOf((*MockClusterAdmin)(nil).DeleteConsumerGroupOffset), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteConsumerGroupOffset", reflect.TypeOf((*MockClusterAdmin)(nil).DeleteConsumerGroupOffset), group, topic, partition) } // DeleteRecords mocks base method. -func (m *MockClusterAdmin) DeleteRecords(arg0 string, arg1 map[int32]int64) error { +func (m *MockClusterAdmin) DeleteRecords(topic string, partitionOffsets map[int32]int64) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteRecords", arg0, arg1) + ret := m.ctrl.Call(m, "DeleteRecords", topic, partitionOffsets) ret0, _ := ret[0].(error) return ret0 } // DeleteRecords indicates an expected call of DeleteRecords. -func (mr *MockClusterAdminMockRecorder) DeleteRecords(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) DeleteRecords(topic, partitionOffsets any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRecords", reflect.TypeOf((*MockClusterAdmin)(nil).DeleteRecords), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteRecords", reflect.TypeOf((*MockClusterAdmin)(nil).DeleteRecords), topic, partitionOffsets) } // DeleteTopic mocks base method. -func (m *MockClusterAdmin) DeleteTopic(arg0 string) error { +func (m *MockClusterAdmin) DeleteTopic(topic string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteTopic", arg0) + ret := m.ctrl.Call(m, "DeleteTopic", topic) ret0, _ := ret[0].(error) return ret0 } // DeleteTopic indicates an expected call of DeleteTopic. -func (mr *MockClusterAdminMockRecorder) DeleteTopic(arg0 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) DeleteTopic(topic any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTopic", reflect.TypeOf((*MockClusterAdmin)(nil).DeleteTopic), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteTopic", reflect.TypeOf((*MockClusterAdmin)(nil).DeleteTopic), topic) } // DeleteUserScramCredentials mocks base method. -func (m *MockClusterAdmin) DeleteUserScramCredentials(arg0 []sarama.AlterUserScramCredentialsDelete) ([]*sarama.AlterUserScramCredentialsResult, error) { +func (m *MockClusterAdmin) DeleteUserScramCredentials(delete []sarama.AlterUserScramCredentialsDelete) ([]*sarama.AlterUserScramCredentialsResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DeleteUserScramCredentials", arg0) + ret := m.ctrl.Call(m, "DeleteUserScramCredentials", delete) ret0, _ := ret[0].([]*sarama.AlterUserScramCredentialsResult) ret1, _ := ret[1].(error) return ret0, ret1 } // DeleteUserScramCredentials indicates an expected call of DeleteUserScramCredentials. -func (mr *MockClusterAdminMockRecorder) DeleteUserScramCredentials(arg0 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) DeleteUserScramCredentials(delete any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUserScramCredentials", reflect.TypeOf((*MockClusterAdmin)(nil).DeleteUserScramCredentials), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteUserScramCredentials", reflect.TypeOf((*MockClusterAdmin)(nil).DeleteUserScramCredentials), delete) } // DescribeClientQuotas mocks base method. -func (m *MockClusterAdmin) DescribeClientQuotas(arg0 []sarama.QuotaFilterComponent, arg1 bool) ([]sarama.DescribeClientQuotasEntry, error) { +func (m *MockClusterAdmin) DescribeClientQuotas(components []sarama.QuotaFilterComponent, strict bool) ([]sarama.DescribeClientQuotasEntry, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DescribeClientQuotas", arg0, arg1) + ret := m.ctrl.Call(m, "DescribeClientQuotas", components, strict) ret0, _ := ret[0].([]sarama.DescribeClientQuotasEntry) ret1, _ := ret[1].(error) return ret0, ret1 } // DescribeClientQuotas indicates an expected call of DescribeClientQuotas. -func (mr *MockClusterAdminMockRecorder) DescribeClientQuotas(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) DescribeClientQuotas(components, strict any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeClientQuotas", reflect.TypeOf((*MockClusterAdmin)(nil).DescribeClientQuotas), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeClientQuotas", reflect.TypeOf((*MockClusterAdmin)(nil).DescribeClientQuotas), components, strict) } // DescribeCluster mocks base method. @@ -658,122 +665,122 @@ func (mr *MockClusterAdminMockRecorder) DescribeCluster() *gomock.Call { } // DescribeConfig mocks base method. -func (m *MockClusterAdmin) DescribeConfig(arg0 sarama.ConfigResource) ([]sarama.ConfigEntry, error) { +func (m *MockClusterAdmin) DescribeConfig(resource sarama.ConfigResource) ([]sarama.ConfigEntry, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DescribeConfig", arg0) + ret := m.ctrl.Call(m, "DescribeConfig", resource) ret0, _ := ret[0].([]sarama.ConfigEntry) ret1, _ := ret[1].(error) return ret0, ret1 } // DescribeConfig indicates an expected call of DescribeConfig. -func (mr *MockClusterAdminMockRecorder) DescribeConfig(arg0 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) DescribeConfig(resource any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeConfig", reflect.TypeOf((*MockClusterAdmin)(nil).DescribeConfig), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeConfig", reflect.TypeOf((*MockClusterAdmin)(nil).DescribeConfig), resource) } // DescribeConsumerGroups mocks base method. -func (m *MockClusterAdmin) DescribeConsumerGroups(arg0 []string) ([]*sarama.GroupDescription, error) { +func (m *MockClusterAdmin) DescribeConsumerGroups(groups []string) ([]*sarama.GroupDescription, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DescribeConsumerGroups", arg0) + ret := m.ctrl.Call(m, "DescribeConsumerGroups", groups) ret0, _ := ret[0].([]*sarama.GroupDescription) ret1, _ := ret[1].(error) return ret0, ret1 } // DescribeConsumerGroups indicates an expected call of DescribeConsumerGroups. -func (mr *MockClusterAdminMockRecorder) DescribeConsumerGroups(arg0 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) DescribeConsumerGroups(groups any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeConsumerGroups", reflect.TypeOf((*MockClusterAdmin)(nil).DescribeConsumerGroups), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeConsumerGroups", reflect.TypeOf((*MockClusterAdmin)(nil).DescribeConsumerGroups), groups) } // DescribeLogDirs mocks base method. -func (m *MockClusterAdmin) DescribeLogDirs(arg0 []int32) (map[int32][]sarama.DescribeLogDirsResponseDirMetadata, error) { +func (m *MockClusterAdmin) DescribeLogDirs(brokers []int32) (map[int32][]sarama.DescribeLogDirsResponseDirMetadata, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DescribeLogDirs", arg0) + ret := m.ctrl.Call(m, "DescribeLogDirs", brokers) ret0, _ := ret[0].(map[int32][]sarama.DescribeLogDirsResponseDirMetadata) ret1, _ := ret[1].(error) return ret0, ret1 } // DescribeLogDirs indicates an expected call of DescribeLogDirs. -func (mr *MockClusterAdminMockRecorder) DescribeLogDirs(arg0 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) DescribeLogDirs(brokers any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeLogDirs", reflect.TypeOf((*MockClusterAdmin)(nil).DescribeLogDirs), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeLogDirs", reflect.TypeOf((*MockClusterAdmin)(nil).DescribeLogDirs), brokers) } // DescribeTopics mocks base method. -func (m *MockClusterAdmin) DescribeTopics(arg0 []string) ([]*sarama.TopicMetadata, error) { +func (m *MockClusterAdmin) DescribeTopics(topics []string) ([]*sarama.TopicMetadata, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DescribeTopics", arg0) + ret := m.ctrl.Call(m, "DescribeTopics", topics) ret0, _ := ret[0].([]*sarama.TopicMetadata) ret1, _ := ret[1].(error) return ret0, ret1 } // DescribeTopics indicates an expected call of DescribeTopics. -func (mr *MockClusterAdminMockRecorder) DescribeTopics(arg0 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) DescribeTopics(topics any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeTopics", reflect.TypeOf((*MockClusterAdmin)(nil).DescribeTopics), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeTopics", reflect.TypeOf((*MockClusterAdmin)(nil).DescribeTopics), topics) } // DescribeUserScramCredentials mocks base method. -func (m *MockClusterAdmin) DescribeUserScramCredentials(arg0 []string) ([]*sarama.DescribeUserScramCredentialsResult, error) { +func (m *MockClusterAdmin) DescribeUserScramCredentials(users []string) ([]*sarama.DescribeUserScramCredentialsResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "DescribeUserScramCredentials", arg0) + ret := m.ctrl.Call(m, "DescribeUserScramCredentials", users) ret0, _ := ret[0].([]*sarama.DescribeUserScramCredentialsResult) ret1, _ := ret[1].(error) return ret0, ret1 } // DescribeUserScramCredentials indicates an expected call of DescribeUserScramCredentials. -func (mr *MockClusterAdminMockRecorder) DescribeUserScramCredentials(arg0 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) DescribeUserScramCredentials(users any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeUserScramCredentials", reflect.TypeOf((*MockClusterAdmin)(nil).DescribeUserScramCredentials), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DescribeUserScramCredentials", reflect.TypeOf((*MockClusterAdmin)(nil).DescribeUserScramCredentials), users) } // IncrementalAlterConfig mocks base method. -func (m *MockClusterAdmin) IncrementalAlterConfig(arg0 sarama.ConfigResourceType, arg1 string, arg2 map[string]sarama.IncrementalAlterConfigsEntry, arg3 bool) error { +func (m *MockClusterAdmin) IncrementalAlterConfig(resourceType sarama.ConfigResourceType, name string, entries map[string]sarama.IncrementalAlterConfigsEntry, validateOnly bool) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IncrementalAlterConfig", arg0, arg1, arg2, arg3) + ret := m.ctrl.Call(m, "IncrementalAlterConfig", resourceType, name, entries, validateOnly) ret0, _ := ret[0].(error) return ret0 } // IncrementalAlterConfig indicates an expected call of IncrementalAlterConfig. -func (mr *MockClusterAdminMockRecorder) IncrementalAlterConfig(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) IncrementalAlterConfig(resourceType, name, entries, validateOnly any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IncrementalAlterConfig", reflect.TypeOf((*MockClusterAdmin)(nil).IncrementalAlterConfig), arg0, arg1, arg2, arg3) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IncrementalAlterConfig", reflect.TypeOf((*MockClusterAdmin)(nil).IncrementalAlterConfig), resourceType, name, entries, validateOnly) } // ListAcls mocks base method. -func (m *MockClusterAdmin) ListAcls(arg0 sarama.AclFilter) ([]sarama.ResourceAcls, error) { +func (m *MockClusterAdmin) ListAcls(filter sarama.AclFilter) ([]sarama.ResourceAcls, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListAcls", arg0) + ret := m.ctrl.Call(m, "ListAcls", filter) ret0, _ := ret[0].([]sarama.ResourceAcls) ret1, _ := ret[1].(error) return ret0, ret1 } // ListAcls indicates an expected call of ListAcls. -func (mr *MockClusterAdminMockRecorder) ListAcls(arg0 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) ListAcls(filter any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAcls", reflect.TypeOf((*MockClusterAdmin)(nil).ListAcls), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListAcls", reflect.TypeOf((*MockClusterAdmin)(nil).ListAcls), filter) } // ListConsumerGroupOffsets mocks base method. -func (m *MockClusterAdmin) ListConsumerGroupOffsets(arg0 string, arg1 map[string][]int32) (*sarama.OffsetFetchResponse, error) { +func (m *MockClusterAdmin) ListConsumerGroupOffsets(group string, topicPartitions map[string][]int32) (*sarama.OffsetFetchResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListConsumerGroupOffsets", arg0, arg1) + ret := m.ctrl.Call(m, "ListConsumerGroupOffsets", group, topicPartitions) ret0, _ := ret[0].(*sarama.OffsetFetchResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // ListConsumerGroupOffsets indicates an expected call of ListConsumerGroupOffsets. -func (mr *MockClusterAdminMockRecorder) ListConsumerGroupOffsets(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) ListConsumerGroupOffsets(group, topicPartitions any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListConsumerGroupOffsets", reflect.TypeOf((*MockClusterAdmin)(nil).ListConsumerGroupOffsets), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListConsumerGroupOffsets", reflect.TypeOf((*MockClusterAdmin)(nil).ListConsumerGroupOffsets), group, topicPartitions) } // ListConsumerGroups mocks base method. @@ -792,18 +799,18 @@ func (mr *MockClusterAdminMockRecorder) ListConsumerGroups() *gomock.Call { } // ListPartitionReassignments mocks base method. -func (m *MockClusterAdmin) ListPartitionReassignments(arg0 string, arg1 []int32) (map[string]map[int32]*sarama.PartitionReplicaReassignmentsStatus, error) { +func (m *MockClusterAdmin) ListPartitionReassignments(topics string, partitions []int32) (map[string]map[int32]*sarama.PartitionReplicaReassignmentsStatus, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "ListPartitionReassignments", arg0, arg1) + ret := m.ctrl.Call(m, "ListPartitionReassignments", topics, partitions) ret0, _ := ret[0].(map[string]map[int32]*sarama.PartitionReplicaReassignmentsStatus) ret1, _ := ret[1].(error) return ret0, ret1 } // ListPartitionReassignments indicates an expected call of ListPartitionReassignments. -func (mr *MockClusterAdminMockRecorder) ListPartitionReassignments(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) ListPartitionReassignments(topics, partitions any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPartitionReassignments", reflect.TypeOf((*MockClusterAdmin)(nil).ListPartitionReassignments), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListPartitionReassignments", reflect.TypeOf((*MockClusterAdmin)(nil).ListPartitionReassignments), topics, partitions) } // ListTopics mocks base method. @@ -822,31 +829,31 @@ func (mr *MockClusterAdminMockRecorder) ListTopics() *gomock.Call { } // RemoveMemberFromConsumerGroup mocks base method. -func (m *MockClusterAdmin) RemoveMemberFromConsumerGroup(arg0 string, arg1 []string) (*sarama.LeaveGroupResponse, error) { +func (m *MockClusterAdmin) RemoveMemberFromConsumerGroup(groupId string, groupInstanceIds []string) (*sarama.LeaveGroupResponse, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "RemoveMemberFromConsumerGroup", arg0, arg1) + ret := m.ctrl.Call(m, "RemoveMemberFromConsumerGroup", groupId, groupInstanceIds) ret0, _ := ret[0].(*sarama.LeaveGroupResponse) ret1, _ := ret[1].(error) return ret0, ret1 } // RemoveMemberFromConsumerGroup indicates an expected call of RemoveMemberFromConsumerGroup. -func (mr *MockClusterAdminMockRecorder) RemoveMemberFromConsumerGroup(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) RemoveMemberFromConsumerGroup(groupId, groupInstanceIds any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveMemberFromConsumerGroup", reflect.TypeOf((*MockClusterAdmin)(nil).RemoveMemberFromConsumerGroup), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RemoveMemberFromConsumerGroup", reflect.TypeOf((*MockClusterAdmin)(nil).RemoveMemberFromConsumerGroup), groupId, groupInstanceIds) } // UpsertUserScramCredentials mocks base method. -func (m *MockClusterAdmin) UpsertUserScramCredentials(arg0 []sarama.AlterUserScramCredentialsUpsert) ([]*sarama.AlterUserScramCredentialsResult, error) { +func (m *MockClusterAdmin) UpsertUserScramCredentials(upsert []sarama.AlterUserScramCredentialsUpsert) ([]*sarama.AlterUserScramCredentialsResult, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "UpsertUserScramCredentials", arg0) + ret := m.ctrl.Call(m, "UpsertUserScramCredentials", upsert) ret0, _ := ret[0].([]*sarama.AlterUserScramCredentialsResult) ret1, _ := ret[1].(error) return ret0, ret1 } // UpsertUserScramCredentials indicates an expected call of UpsertUserScramCredentials. -func (mr *MockClusterAdminMockRecorder) UpsertUserScramCredentials(arg0 interface{}) *gomock.Call { +func (mr *MockClusterAdminMockRecorder) UpsertUserScramCredentials(upsert any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertUserScramCredentials", reflect.TypeOf((*MockClusterAdmin)(nil).UpsertUserScramCredentials), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpsertUserScramCredentials", reflect.TypeOf((*MockClusterAdmin)(nil).UpsertUserScramCredentials), upsert) } diff --git a/mockstorage.go b/mockstorage.go index 5eb29bee..df79d859 100644 --- a/mockstorage.go +++ b/mockstorage.go @@ -1,5 +1,10 @@ // Code generated by MockGen. DO NOT EDIT. // Source: github.com/lovoo/goka/storage (interfaces: Storage) +// +// Generated by this command: +// +// mockgen -self_package github.com/lovoo/goka -package goka -destination mockstorage.go github.com/lovoo/goka/storage Storage +// // Package goka is a generated GoMock package. package goka @@ -7,14 +12,15 @@ package goka import ( reflect "reflect" - gomock "github.com/golang/mock/gomock" storage "github.com/lovoo/goka/storage" + gomock "go.uber.org/mock/gomock" ) // MockStorage is a mock of Storage interface. type MockStorage struct { ctrl *gomock.Controller recorder *MockStorageMockRecorder + isgomock struct{} } // MockStorageMockRecorder is the mock recorder for MockStorage. @@ -49,62 +55,62 @@ func (mr *MockStorageMockRecorder) Close() *gomock.Call { } // Delete mocks base method. -func (m *MockStorage) Delete(arg0 string) error { +func (m *MockStorage) Delete(key string) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Delete", arg0) + ret := m.ctrl.Call(m, "Delete", key) ret0, _ := ret[0].(error) return ret0 } // Delete indicates an expected call of Delete. -func (mr *MockStorageMockRecorder) Delete(arg0 interface{}) *gomock.Call { +func (mr *MockStorageMockRecorder) Delete(key any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStorage)(nil).Delete), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockStorage)(nil).Delete), key) } // Get mocks base method. -func (m *MockStorage) Get(arg0 string) ([]byte, error) { +func (m *MockStorage) Get(key string) ([]byte, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Get", arg0) + ret := m.ctrl.Call(m, "Get", key) ret0, _ := ret[0].([]byte) ret1, _ := ret[1].(error) return ret0, ret1 } // Get indicates an expected call of Get. -func (mr *MockStorageMockRecorder) Get(arg0 interface{}) *gomock.Call { +func (mr *MockStorageMockRecorder) Get(key any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStorage)(nil).Get), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockStorage)(nil).Get), key) } // GetOffset mocks base method. -func (m *MockStorage) GetOffset(arg0 int64) (int64, error) { +func (m *MockStorage) GetOffset(def int64) (int64, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetOffset", arg0) + ret := m.ctrl.Call(m, "GetOffset", def) ret0, _ := ret[0].(int64) ret1, _ := ret[1].(error) return ret0, ret1 } // GetOffset indicates an expected call of GetOffset. -func (mr *MockStorageMockRecorder) GetOffset(arg0 interface{}) *gomock.Call { +func (mr *MockStorageMockRecorder) GetOffset(def any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOffset", reflect.TypeOf((*MockStorage)(nil).GetOffset), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetOffset", reflect.TypeOf((*MockStorage)(nil).GetOffset), def) } // Has mocks base method. -func (m *MockStorage) Has(arg0 string) (bool, error) { +func (m *MockStorage) Has(key string) (bool, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Has", arg0) + ret := m.ctrl.Call(m, "Has", key) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // Has indicates an expected call of Has. -func (mr *MockStorageMockRecorder) Has(arg0 interface{}) *gomock.Call { +func (mr *MockStorageMockRecorder) Has(key any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Has", reflect.TypeOf((*MockStorage)(nil).Has), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Has", reflect.TypeOf((*MockStorage)(nil).Has), key) } // Iterator mocks base method. @@ -123,18 +129,18 @@ func (mr *MockStorageMockRecorder) Iterator() *gomock.Call { } // IteratorWithRange mocks base method. -func (m *MockStorage) IteratorWithRange(arg0, arg1 []byte) (storage.Iterator, error) { +func (m *MockStorage) IteratorWithRange(start, limit []byte) (storage.Iterator, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "IteratorWithRange", arg0, arg1) + ret := m.ctrl.Call(m, "IteratorWithRange", start, limit) ret0, _ := ret[0].(storage.Iterator) ret1, _ := ret[1].(error) return ret0, ret1 } // IteratorWithRange indicates an expected call of IteratorWithRange. -func (mr *MockStorageMockRecorder) IteratorWithRange(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStorageMockRecorder) IteratorWithRange(start, limit any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IteratorWithRange", reflect.TypeOf((*MockStorage)(nil).IteratorWithRange), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IteratorWithRange", reflect.TypeOf((*MockStorage)(nil).IteratorWithRange), start, limit) } // MarkRecovered mocks base method. @@ -166,29 +172,29 @@ func (mr *MockStorageMockRecorder) Open() *gomock.Call { } // Set mocks base method. -func (m *MockStorage) Set(arg0 string, arg1 []byte) error { +func (m *MockStorage) Set(key string, value []byte) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Set", arg0, arg1) + ret := m.ctrl.Call(m, "Set", key, value) ret0, _ := ret[0].(error) return ret0 } // Set indicates an expected call of Set. -func (mr *MockStorageMockRecorder) Set(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockStorageMockRecorder) Set(key, value any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockStorage)(nil).Set), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Set", reflect.TypeOf((*MockStorage)(nil).Set), key, value) } // SetOffset mocks base method. -func (m *MockStorage) SetOffset(arg0 int64) error { +func (m *MockStorage) SetOffset(offset int64) error { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SetOffset", arg0) + ret := m.ctrl.Call(m, "SetOffset", offset) ret0, _ := ret[0].(error) return ret0 } // SetOffset indicates an expected call of SetOffset. -func (mr *MockStorageMockRecorder) SetOffset(arg0 interface{}) *gomock.Call { +func (mr *MockStorageMockRecorder) SetOffset(offset any) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOffset", reflect.TypeOf((*MockStorage)(nil).SetOffset), arg0) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetOffset", reflect.TypeOf((*MockStorage)(nil).SetOffset), offset) } diff --git a/partition_table_test.go b/partition_table_test.go index a0db354f..a636de77 100644 --- a/partition_table_test.go +++ b/partition_table_test.go @@ -10,9 +10,9 @@ import ( "time" "github.com/IBM/sarama" - "github.com/golang/mock/gomock" "github.com/lovoo/goka/storage" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" ) func defaultPT( diff --git a/processor_test.go b/processor_test.go index b6ac6e29..342bacdb 100644 --- a/processor_test.go +++ b/processor_test.go @@ -9,11 +9,10 @@ import ( "time" "github.com/IBM/sarama" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - "github.com/lovoo/goka/codec" "github.com/lovoo/goka/storage" + "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" ) func createMockBuilder(t *testing.T) (*gomock.Controller, *builderMock) { diff --git a/topic_manager_test.go b/topic_manager_test.go index 78c2ad60..468307d8 100644 --- a/topic_manager_test.go +++ b/topic_manager_test.go @@ -6,8 +6,8 @@ import ( "time" "github.com/IBM/sarama" - "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" ) var tmTestBrokers = []string{"0"} diff --git a/view_test.go b/view_test.go index df4c5085..c6602fac 100644 --- a/view_test.go +++ b/view_test.go @@ -11,10 +11,10 @@ import ( "time" "github.com/IBM/sarama" - "github.com/golang/mock/gomock" "github.com/lovoo/goka/codec" "github.com/lovoo/goka/storage" "github.com/stretchr/testify/require" + "go.uber.org/mock/gomock" ) var (